org.vizzini.math
Class State

java.lang.Object
  extended by org.vizzini.math.State
All Implemented Interfaces:
Serializable, Cloneable, IState

public class State
extends Object
implements IState

Provides simple state of an object.

Since:
v0.2
Version:
v0.2
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Constructor Summary
State()
           
 
Method Summary
 Object clone()
          Return a clone of this instance.
 Vector convertLocalToWorld(Vector v)
          Convert the given vector from local coordinates to world coordinates.
 Vector convertWorldToLocal(Vector v)
          Convert the given vector from world coordinates to local coordinates.
 Quaternion getOrientation()
          Return the orientation quaternion.
 Vector getPosition()
          Return the position vector.
 Vector getPreviousPosition()
          Return the previous position vector.
 void move(Vector movement)
          Move using the given vector.
 Vector orientLocalToWorld(Vector v)
          Orient the given vector from local coordinates to world coordinates.
 Vector orientWorldToLocal(Vector v)
          Orient the given vector from world coordinates to local coordinates.
 void rotate(Quaternion rotation)
          Rotate using the given quaternion.
 void setOrientation(Quaternion orientation)
          Set the orientation.
 void setPosition(Vector position)
          Set the position.
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

State

public State()
Method Detail

clone

public Object clone()
Return a clone of this instance.

Specified by:
clone in interface IState
Overrides:
clone in class Object
Since:
v0.2

convertLocalToWorld

public Vector convertLocalToWorld(Vector v)
Convert the given vector from local coordinates to world coordinates.

Specified by:
convertLocalToWorld in interface IState
Parameters:
v - Vector in local coordinates.
Since:
v0.2

convertWorldToLocal

public Vector convertWorldToLocal(Vector v)
Convert the given vector from world coordinates to local coordinates.

Specified by:
convertWorldToLocal in interface IState
Parameters:
v - Vector in local coordinates.
Since:
v0.2

getOrientation

public Quaternion getOrientation()
Return the orientation quaternion.

Specified by:
getOrientation in interface IState
Since:
v0.2

getPosition

public Vector getPosition()
Return the position vector.

Specified by:
getPosition in interface IState
Since:
v0.2

getPreviousPosition

public Vector getPreviousPosition()
Return the previous position vector.

Specified by:
getPreviousPosition in interface IState
Since:
v0.2

move

public void move(Vector movement)
Move using the given vector.

Specified by:
move in interface IState
Since:
v0.2

orientLocalToWorld

public Vector orientLocalToWorld(Vector v)
Orient the given vector from local coordinates to world coordinates.

Specified by:
orientLocalToWorld in interface IState
Parameters:
v - Vector in local coordinates.
Since:
v0.2

orientWorldToLocal

public Vector orientWorldToLocal(Vector v)
Orient the given vector from world coordinates to local coordinates.

Specified by:
orientWorldToLocal in interface IState
Parameters:
v - Vector in world coordinates.
Since:
v0.2

rotate

public void rotate(Quaternion rotation)
Rotate using the given quaternion.

Specified by:
rotate in interface IState
Since:
v0.2

setOrientation

public void setOrientation(Quaternion orientation)
Set the orientation.

Specified by:
setOrientation in interface IState
Since:
v0.2

setPosition

public void setPosition(Vector position)
Set the position.

Specified by:
setPosition in interface IState
Since:
v0.2

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class Object
Since:
v0.2


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02