org.osm2world.core.target.common.rendering
Class Camera

Object
  extended by Camera

public class Camera
extends Object


Constructor Summary
Camera()
           
 
Method Summary
 VectorXYZ getLookAt()
           
 VectorXYZ getPos()
           
 VectorXYZ getRight()
          returns the vector that is orthogonal to the connection between pos and lookAt and points to the right of it.
 VectorXYZ getViewDirection()
          returns the view direction vector with length 1
 void move(double moveX, double moveY, double moveZ)
          moves both pos and lookAt by the given vector
 void move(VectorXYZ move)
          moves both pos and lookAt by the given vector
 void moveForward(double step)
          moves pos and lookAt in the view direction
 void moveRight(double step)
          moves pos and lookAt to the right, orthogonally to the view direction
 void rotateAroundRight(double d)
          moves lookAt to represent a rotation counterclockwise around the direction returned by getRight()
 void rotateY(double d)
          moves lookAt to represent a rotation counterclockwise around the y axis on pos
 void setLookAt(double x, double y, double z)
           
 void setLookAt(VectorXYZ lookAt)
           
 void setPos(double x, double y, double z)
           
 void setPos(VectorXYZ pos)
           
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Camera

public Camera()
Method Detail

getViewDirection

public VectorXYZ getViewDirection()
returns the view direction vector with length 1


getRight

public VectorXYZ getRight()
returns the vector that is orthogonal to the connection between pos and lookAt and points to the right of it. The result has length 1 and is parallel to the XZ plane.


getPos

public VectorXYZ getPos()

getLookAt

public VectorXYZ getLookAt()

setPos

public void setPos(VectorXYZ pos)

setPos

public void setPos(double x,
                   double y,
                   double z)

setLookAt

public void setLookAt(VectorXYZ lookAt)

setLookAt

public void setLookAt(double x,
                      double y,
                      double z)

moveForward

public void moveForward(double step)
moves pos and lookAt in the view direction

Parameters:
step - units to move forward

moveRight

public void moveRight(double step)
moves pos and lookAt to the right, orthogonally to the view direction

Parameters:
step - units to move right, negative units move to the left

move

public void move(VectorXYZ move)
moves both pos and lookAt by the given vector


move

public void move(double moveX,
                 double moveY,
                 double moveZ)
moves both pos and lookAt by the given vector


rotateY

public void rotateY(double d)
moves lookAt to represent a rotation counterclockwise around the y axis on pos

Parameters:
d - angle in radians

rotateAroundRight

public void rotateAroundRight(double d)
moves lookAt to represent a rotation counterclockwise around the direction returned by getRight()

Parameters:
d - angle in radians

toString

public String toString()
Overrides:
toString in class Object