seltar.motion
Class Vector

java.lang.Object
  extended byseltar.motion.Vector

public class Vector
extends java.lang.Object


Constructor Summary
Vector()
          Constructor Sets Length and Direction to 0
Vector(float L, float D)
          Constructor Sets Length and Direction to given variables
Vector(Point P)
          Constructor Sets Length and Direction to given Point
 
Method Summary
 Vector addVector(Vector V)
          Adds a Vector (Velocity & Direction) to Vector v
 float dot(Vector V)
          Returns the dotproduct of this Vector and given Vector V
 Point getCoords()
          Gets Velocity-Coordinates
 float getDirection()
          Gets Direction
 float getVelocity()
          Gets Velocity
 float getVX()
          Gets Velocity-X
 float getVY()
          Gets Velocity-Y
 Vector multiply(float k)
          Multiply Velocity & Direction by given variable
 Vector multiply(float k, float j)
          Multiply Velocity & Direction by given variable
 Vector normal()
          Returns the normal of this Vector
 void setDirection(float D)
          Sets Direction (radians)
 void setVelocity(float L)
          Sets Velocity
 void setVelocity(float X, float Y)
          Sets Velocity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Vector

public Vector()
Constructor Sets Length and Direction to 0


Vector

public Vector(float L,
              float D)
Constructor Sets Length and Direction to given variables


Vector

public Vector(Point P)
Constructor Sets Length and Direction to given Point

Method Detail

getDirection

public float getDirection()
Gets Direction

Returns:
float Direction

getVelocity

public float getVelocity()
Gets Velocity

Returns:
float Velocity

getVX

public float getVX()
Gets Velocity-X

Returns:
float Velocity-X

getVY

public float getVY()
Gets Velocity-Y

Returns:
float Velocity-Y

getCoords

public Point getCoords()
Gets Velocity-Coordinates

Returns:
float Velocity-Coordinates

setDirection

public void setDirection(float D)
Sets Direction (radians)

Parameters:
D - Direction in radians

setVelocity

public void setVelocity(float L)
Sets Velocity

Parameters:
L - Velocity

setVelocity

public void setVelocity(float X,
                        float Y)
Sets Velocity

Parameters:
X - Velocity-X
Y - Velocity-Y

addVector

public Vector addVector(Vector V)
Adds a Vector (Velocity & Direction) to Vector v

Parameters:
V - Vector V

multiply

public Vector multiply(float k)
Multiply Velocity & Direction by given variable

Parameters:
k - Multiplier

multiply

public Vector multiply(float k,
                       float j)
Multiply Velocity & Direction by given variable

Parameters:
k - X-Multiplier
j - Y-Multiplier

dot

public float dot(Vector V)
Returns the dotproduct of this Vector and given Vector V


normal

public Vector normal()
Returns the normal of this Vector