|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.math3D.Transform3D
com.brackeen.javagamebook.math3D.MovingTransform3D
A MovingTransform3D is a Transform3D that has a location velocity and a angular rotation velocity for rotation around the x, y, and z axes.
Field Summary | |
static int |
FOREVER
|
Constructor Summary | |
MovingTransform3D()
Creates a new MovingTransform3D |
|
MovingTransform3D(Transform3D v)
Creates a new MovingTransform3D, using the same values as the specified Transform3D. |
Method Summary | |
void |
addVelocity(Vector3D v)
Adds the specified velocity to the current velocity. |
java.lang.Object |
clone()
|
float |
getAngleVelocityX()
Sets the angular speed of the x axis over the specified time. |
float |
getAngleVelocityY()
Sets the angular speed of the y axis over the specified time. |
float |
getAngleVelocityZ()
Sets the angular speed of the z axis over the specified time. |
long |
getRemainingMoveTime()
Gets the amount of time remaining for this movement. |
Vector3D |
getVelocity()
Gets the velocity vector. |
boolean |
isMoving()
Returns true if currently moving. |
boolean |
isMovingIgnoreY()
Returns true if currently moving, ignoring the y movement. |
boolean |
isTurningX()
Returns true if the x axis is currently turning. |
boolean |
isTurningY()
Returns true if the y axis is currently turning. |
boolean |
isTurningZ()
Returns true if the z axis is currently turning. |
void |
moveTo(Vector3D destination,
float speed)
Sets the velocity to move to the following destination at the specified speed. |
void |
setAngleVelocityX(float speed)
Sets the angular speed of the x axis. |
void |
setAngleVelocityX(float speed,
long time)
Sets the angular speed of the x axis over the specified time. |
void |
setAngleVelocityY(float speed)
Sets the angular speed of the y axis. |
void |
setAngleVelocityY(float speed,
long time)
Sets the angular speed of the y axis over the specified time. |
void |
setAngleVelocityZ(float speed)
Sets the angular speed of the z axis. |
void |
setAngleVelocityZ(float speed,
long time)
Sets the angular speed of the z axis over the specified time. |
void |
setVelocity(Vector3D v)
Sets the velocity to the specified vector. |
void |
setVelocity(Vector3D v,
long time)
Sets the velocity. |
void |
stop()
Stops this Transform3D. |
void |
turnXTo(float angleDest,
float speed)
Turns the x axis to the specified angle with the specified speed. |
void |
turnXTo(float y,
float z,
float angleOffset,
float speed)
Turns the x axis to face the specified (y,z) vector direction with the specified speed. |
void |
turnYTo(float angleDest,
float speed)
Turns the y axis to the specified angle with the specified speed. |
void |
turnYTo(float x,
float z,
float angleOffset,
float speed)
Turns the y axis to face the specified (x,z) vector direction with the specified speed. |
void |
turnZTo(float angleDest,
float speed)
Turns the z axis to the specified angle with the specified speed. |
void |
turnZTo(float x,
float y,
float angleOffset,
float speed)
Turns the z axis to face the specified (x,y) vector direction with the specified speed. |
void |
update(long elapsedTime)
Updates this Transform3D based on the specified elapsed time. |
Methods inherited from class com.brackeen.javagamebook.math3D.Transform3D |
getAngleX, getAngleY, getAngleZ, getCosAngleX, getCosAngleY, getCosAngleZ, getLocation, getSinAngleX, getSinAngleY, getSinAngleZ, rotateAngle, rotateAngleX, rotateAngleY, rotateAngleZ, setAngle, setAngleX, setAngleY, setAngleZ, setTo |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FOREVER
Constructor Detail |
public MovingTransform3D()
public MovingTransform3D(Transform3D v)
Method Detail |
public java.lang.Object clone()
clone
in class Transform3D
public void update(long elapsedTime)
public void stop()
public void moveTo(Vector3D destination, float speed)
public boolean isMoving()
public boolean isMovingIgnoreY()
public long getRemainingMoveTime()
public Vector3D getVelocity()
public void setVelocity(Vector3D v)
public void setVelocity(Vector3D v, long time)
public void addVelocity(Vector3D v)
public void turnXTo(float angleDest, float speed)
public void turnYTo(float angleDest, float speed)
public void turnZTo(float angleDest, float speed)
public void turnXTo(float y, float z, float angleOffset, float speed)
public void turnYTo(float x, float z, float angleOffset, float speed)
public void turnZTo(float x, float y, float angleOffset, float speed)
public void setAngleVelocityX(float speed)
public void setAngleVelocityY(float speed)
public void setAngleVelocityZ(float speed)
public void setAngleVelocityX(float speed, long time)
public void setAngleVelocityY(float speed, long time)
public void setAngleVelocityZ(float speed, long time)
public float getAngleVelocityX()
public float getAngleVelocityY()
public float getAngleVelocityZ()
public boolean isTurningX()
public boolean isTurningY()
public boolean isTurningZ()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |