cdx
Class VectorConstants

java.lang.Object
  extended by cdx.VectorConstants

public final class VectorConstants
extends java.lang.Object

The VectorConstants class implements some simple utility methods for obtaining vectors that are commonly used, such as zero vectors unit direction vectors, and orthogonal vectors.


Field Summary
static int NE_QUADRANT
           
static int NO_QUADRANT
           
static int NW_QUADRANT
           
static int SE_QUADRANT
           
static int SW_QUADRANT
           
 
Constructor Summary
VectorConstants()
           
 
Method Summary
static void direction(float deg, Vector2d dest)
          The direction method is a utility function that will return a unit vector in the direction specified.
static void direction(float deg, Vector3d dest)
          The direction method is a utility function that will return a unit vector in the direction specified.
static void down(Vector3d dest)
          The down method is a utility function that will set the destination operand to a unit vector pointing in the "down" direction.
static void east(Vector2d dest)
          The east method is a utility function that will set the destination operand to a unit vector pointing in the "east" direction.
static void east(Vector3d dest)
          The east method is a utility function that will set the destination operand to a unit vector pointing in the "east" direction.
static void north(Vector2d dest)
          The north method is a utility function that will set the destination operand to a unit vector pointing in the "north" direction.
static void north(Vector3d dest)
          The north method is a utility function that will set the destination operand to a unit vector pointing in the "north" direction.
static void south(Vector2d dest)
          The south method is a utility function that will set the destination operand to a unit vector pointing in the "south" direction.
static void south(Vector3d dest)
          The south method is a utility function that will set the destination operand to a unit vector pointing in the "south" direction.
static void up(Vector3d dest)
          The up method is a utility function that will set the destination operand to a unit vector pointing in the "up" direction.
static void west(Vector2d dest)
          The west method is a utility function that will set the destination operand to a unit vector pointing in the "west" direction.
static void west(Vector3d dest)
          The west method is a utility function that will set the destination operand to a unit vector pointing in the "west" direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_QUADRANT

public static final int NO_QUADRANT
See Also:
Constant Field Values

NE_QUADRANT

public static final int NE_QUADRANT
See Also:
Constant Field Values

NW_QUADRANT

public static final int NW_QUADRANT
See Also:
Constant Field Values

SE_QUADRANT

public static final int SE_QUADRANT
See Also:
Constant Field Values

SW_QUADRANT

public static final int SW_QUADRANT
See Also:
Constant Field Values
Constructor Detail

VectorConstants

public VectorConstants()
Method Detail

west

public static void west(Vector3d dest)
The west method is a utility function that will set the destination operand to a unit vector pointing in the "west" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

east

public static void east(Vector3d dest)
The east method is a utility function that will set the destination operand to a unit vector pointing in the "east" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

north

public static void north(Vector3d dest)
The north method is a utility function that will set the destination operand to a unit vector pointing in the "north" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

south

public static void south(Vector3d dest)
The south method is a utility function that will set the destination operand to a unit vector pointing in the "south" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

up

public static void up(Vector3d dest)
The up method is a utility function that will set the destination operand to a unit vector pointing in the "up" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

down

public static void down(Vector3d dest)
The down method is a utility function that will set the destination operand to a unit vector pointing in the "down" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

direction

public static void direction(float deg,
                             Vector3d dest)
The direction method is a utility function that will return a unit vector in the direction specified. It takes an argument in degrees and a vector destination where it stores the result.

Parameters:
deg - the angle's value in degrees
dest - the vector in which to store the result

west

public static void west(Vector2d dest)
The west method is a utility function that will set the destination operand to a unit vector pointing in the "west" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

east

public static void east(Vector2d dest)
The east method is a utility function that will set the destination operand to a unit vector pointing in the "east" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

north

public static void north(Vector2d dest)
The north method is a utility function that will set the destination operand to a unit vector pointing in the "north" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

south

public static void south(Vector2d dest)
The south method is a utility function that will set the destination operand to a unit vector pointing in the "south" direction. This family of functions has been added for convenient access to the common orthogonal directions.

Parameters:
dest - the vector in which to store the result

direction

public static void direction(float deg,
                             Vector2d dest)
The direction method is a utility function that will return a unit vector in the direction specified. It takes an argument in degrees and a vector destination where it stores the result.

Parameters:
deg - the angle's value in degrees
dest - the vector in which to store the result