edu.uprm.ece.terrainrenderer
Class Angle

java.lang.Object
  extended by edu.uprm.ece.terrainrenderer.Vector
      extended by edu.uprm.ece.terrainrenderer.Angle

public class Angle
extends Vector

Author:
Ricardo Veguilla (veguilla@ece.uprm.edu)

Field Summary
private  Vector forward
           
static int PITCH
           
private  Vector right
           
static int ROLL
           
private  Vector up
           
static int YAW
           
 
Fields inherited from class edu.uprm.ece.terrainrenderer.Vector
value, W, X, Y, Z
 
Constructor Summary
Angle()
           
Angle(float yaw, float pitch, float roll)
           
 
Method Summary
private  void angleVectors()
           
private  void fixAngles()
           
private  void fixPitchAngle()
           
private  void fixRollAngle()
           
private  void fixYawAngle()
           
 Vector getForward()
           
 float getPitch()
           
 Vector getRight()
           
 float getRoll()
           
 Vector getUp()
           
 float getYaw()
           
 void incrementPitch(float delta)
           
 void incrementRoll(float delta)
           
 void incrementYaw(float delta)
           
 void setAngles(float yaw, float pitch, float roll)
           
 void setForward(Vector forwardVector)
           
 void setPitch(float pitch)
           
 void setRight(Vector rightVector)
           
 void setRoll(float roll)
           
 void setUp(Vector upVector)
           
 void setValue(float[] angles)
           
 void setYaw(float yaw)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.uprm.ece.terrainrenderer.Vector
add, add, add, crossProduct, crossProduct, dotProduct, dotProduct, getSize, getValue, getX, getY, getZ, increment, incrementX, incrementY, incrementZ, inverse, invert, length, multiplyAndAdd, multiplyAndAdd, multiplyAndAdd, multiplyAndAdd, normalize, normalize, normalized, perpendicular, scale, scale, scaled, setValues, setValues, setX, setY, setZ, substract, subtract, subtract
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

YAW

public static final int YAW
See Also:
Constant Field Values

PITCH

public static final int PITCH
See Also:
Constant Field Values

ROLL

public static final int ROLL
See Also:
Constant Field Values

forward

private Vector forward

right

private Vector right

up

private Vector up
Constructor Detail

Angle

public Angle()

Angle

public Angle(float yaw,
             float pitch,
             float roll)
Method Detail

setAngles

public void setAngles(float yaw,
                      float pitch,
                      float roll)

setValue

public void setValue(float[] angles)
Overrides:
setValue in class Vector

getYaw

public float getYaw()

getPitch

public float getPitch()

getRoll

public float getRoll()

setYaw

public void setYaw(float yaw)

setPitch

public void setPitch(float pitch)

setRoll

public void setRoll(float roll)

incrementYaw

public void incrementYaw(float delta)

incrementPitch

public void incrementPitch(float delta)

incrementRoll

public void incrementRoll(float delta)

fixAngles

private void fixAngles()

fixPitchAngle

private void fixPitchAngle()

fixYawAngle

private void fixYawAngle()

fixRollAngle

private void fixRollAngle()

getForward

public Vector getForward()
Returns:
Returns the forward.

setForward

public void setForward(Vector forwardVector)
Parameters:
forward - The forward to set.

getRight

public Vector getRight()
Returns:
Returns the right.

setRight

public void setRight(Vector rightVector)
Parameters:
right - The right to set.

getUp

public Vector getUp()
Returns:
Returns the up.

setUp

public void setUp(Vector upVector)
Parameters:
up - The up to set.

angleVectors

private void angleVectors()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object