|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Camera
public class Camera
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 |
getUp()
|
VectorXYZ |
getViewDirection()
returns the view direction vector with length 1 |
void |
mapPitch(double d)
rotates the camera around an axis orthogonal to the y axis and getViewDirection() . |
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 |
moveMapForward(double step)
moves pos and lookAt forward in the map plane |
void |
moveMapRight(double step)
moves pos and lookAt to the right in the map plane |
void |
moveMapUp(double step)
move pos and lookAt upwards in respect to the map plane |
void |
moveRight(double step)
moves pos and lookAt to the right, orthogonally to the view direction |
void |
moveUp(double step)
move pos and lookAt upwards, orthogonally to the view direction |
void |
pitch(double d)
rotates the camera around the pitch axis |
void |
roll(double d)
rolls the camera |
void |
rotateY(double d)
moves lookAt to represent a rotation counterclockwise around the y axis on pos |
void |
setCamera(double posX,
double posY,
double posZ,
double lookAtX,
double lookAtY,
double lookAtZ)
|
void |
setCamera(double posX,
double posY,
double posZ,
double lookAtX,
double lookAtY,
double lookAtZ,
double upX,
double upY,
double upZ)
|
void |
setPos(VectorXYZ pos)
|
String |
toString()
|
void |
yaw(double d)
rotates the camera around the yaw axis |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Camera()
Method Detail |
---|
public VectorXYZ getViewDirection()
public VectorXYZ getRight()
public VectorXYZ getPos()
public VectorXYZ getLookAt()
public VectorXYZ getUp()
public void setPos(VectorXYZ pos)
public void setCamera(double posX, double posY, double posZ, double lookAtX, double lookAtY, double lookAtZ)
public void setCamera(double posX, double posY, double posZ, double lookAtX, double lookAtY, double lookAtZ, double upX, double upY, double upZ)
public void moveForward(double step)
step
- units to move forwardpublic void moveMapForward(double step)
step
- units to move forwardpublic void moveRight(double step)
step
- units to move right, negative units move to the leftpublic void moveMapRight(double step)
step
- units to move right, negative units move to the leftpublic void moveUp(double step)
step
- units to move up, negative units move downpublic void moveMapUp(double step)
step
- units to move up, negative units move downpublic void move(VectorXYZ move)
public void move(double moveX, double moveY, double moveZ)
public void rotateY(double d)
d
- angle in radianspublic void yaw(double d)
d
- angle in radianspublic void roll(double d)
d
- angle in radianspublic void pitch(double d)
d
- angle in radianspublic void mapPitch(double d)
getViewDirection()
.
The effect is similar to pitch(double)
, but independent
from the current roll angle.
d
- angle in radianspublic String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |