core.field
Class Vec2Field

java.lang.Object
  extended bycore.field.Vec2Field
Direct Known Subclasses:
EMVec2Field, Vec2FieldCache, Vec2UnitField

public abstract class Vec2Field
extends java.lang.Object

A 2-dimensional vector field. Vector fields are created by deriving subclasses that define a function mapping from Vec2 to Vec2.

Version:
1.0
Author:
Andreas Sundquist

Constructor Summary
Vec2Field()
           
 
Method Summary
 Vec2 get(Vec2 p)
          Returns: a new Vec2 with the value of the field at 'p'.
abstract  Vec2 get(Vec2 p, Vec2 f)
          Sets 'f' to the value of the field at 'p'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vec2Field

public Vec2Field()
Method Detail

get

public abstract Vec2 get(Vec2 p,
                         Vec2 f)
Sets 'f' to the value of the field at 'p'. 'p' is not modified Returns: resulting 'f' This abstract method *must* be overridden


get

public Vec2 get(Vec2 p)
Returns: a new Vec2 with the value of the field at 'p'. 'p' is not modified.