com.partnersoft.v3x.graphics
Class TurnVector

java.lang.Object
  extended by com.partnersoft.v3x.graphics.Coord
      extended by com.partnersoft.v3x.graphics.TurnVector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class TurnVector
extends Coord

A TurnArrayList is a 2-dimensional coordinate expressing a magnitude and angular direction. Conversions to various popular angular measurements are provided in ArrayListLib.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.partnersoft.v3x.graphics.Coord
coords
 
Constructor Summary
  TurnVector()
          Default constructor.
protected TurnVector(double[] newCoords)
           
  TurnVector(double distance, double angle)
          Creates a new TurnVector from angle and distance coordinates.
 
Method Summary
 java.lang.Object clone()
          Clones the TurnVector
 double getAngle()
          Get the magnitude of the angle dimension in radians
 double getDistance()
          Returns the magnitude of the distance dimension.
 void setAngle(double newAngle)
          Sets the magnitude of the angle dimension.
 void setDistance(double newDistance)
          Sets the magnitude of the distance dimension.
 
Methods inherited from class com.partnersoft.v3x.graphics.Coord
at, copyState, distance, equals, getCoords, getDimensions, hashCode, round, setCoords, stretch, toString, translate, truncate
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TurnVector

public TurnVector()
Default constructor.


TurnVector

protected TurnVector(double[] newCoords)

TurnVector

public TurnVector(double distance,
                  double angle)
Creates a new TurnVector from angle and distance coordinates.

Method Detail

getAngle

public double getAngle()
Get the magnitude of the angle dimension in radians


setAngle

public void setAngle(double newAngle)
Sets the magnitude of the angle dimension.


getDistance

public double getDistance()
Returns the magnitude of the distance dimension.


setDistance

public void setDistance(double newDistance)
Sets the magnitude of the distance dimension.


clone

public java.lang.Object clone()
Clones the TurnVector

Overrides:
clone in class Coord