Yage3D.net
 

yage.scene.movable

Authors:
Eric Poggel

License:
LGPL v3

class MovableNode : yage.scene.node.Node;
This class adds numerous methods for getting and setting position, rotation, velocity, and angular velocity. All Nodes are movable, this just adds methods to make it easy.

See Also:
yage.scene.visible yage.scene.node

void transformation (Matrix t);
Move and rotate by the transformation Matrix. In other words, apply t as a transformation Matrix.

Matrix* getTransformPtr ();
Return a pointer to the transformation Matrix of this Node. This is faster than returning a copy.

Matrix* getAbsoluteTransformPtr ();
Return a pointer to the transformation Matrix of this Node. This is faster than returning a copy.

Matrix getTransform (bool cached = false);
void setTransform (Matrix transform);
Return the relative transformation Matrix of this Node. This Matrix stores the position and rotation relative to its parent.

Params:
bool cached Get the transformation Matrix cached after the last complete scenegraph update, instead of the current version. This can be used to avoid working with a half-updated scenegraph.

Matrix getAbsoluteTransform (bool cached = false);
Get the absolute transformation Matrix of this Node, calculating it if necessary.

Params:
bool cached Get the absolute transformation Matrix cached after the last complete scenegraph update, instead of the current version. This can be used to avoid working with a half-updated scenegraph.

Vec3f getPosition ();
void setPosition (Vec3f position);
Get / set the position of this Node relative to its parent's position.

Vec3f getAbsolutePosition ();
Get the absolute position of this Node, calculating it if necessary.

Vec3f getRotation ();
void setRotation (Vec3f axis);
Get the rotation of this Node relative to its parent's rotation.

Vec3f getAbsoluteRotation ();
Get the absolute rotation of this Node, calculating it if necessary.

Vec3f getScale ();
Get / set the scale of this Node relative to its parent's scale. Note that scale is inherited by children. Use get/setSize() of VisibleNode for a similar effect that'snot inherited.

void setScale (Vec3f scale);
ditto;

void setVelocity (Vec3f velocity);
Vec3f getVelocity ();
Get / set the velocity of this Node relative to its parent's linear and angular velocity.

Vec3f getAbsoluteVelocity ();
Get the absolute velocity of this Node. TODO: this can be incorrect.

Vec3f getAngularVelocity ();
void setAngularVelocity (Vec3f axis);
Get/set this Node's angular velocity relative to it's parent's rotation and angular velocity. This is represented in an axis-angle vector where the direction is the axis of rotation and the length is the rotation in radians.

void move (Vec3f distance);
Move this Node relative to its parent.

void moveRelative (Vec3f direction);
Move this Node relative to the direction it's pointing (relative to its rotation).

void rotate (Vec3f axis);
Rotate this Node relative to its current rotation axis, using an axis angle

void accelerate (Vec3f v);
Accelerate the Node in the direction specified

void accelerateRelative (Vec3f v);
Accelerate relative to the way this Node is rotated (pointed).

void angularAccelerate (Vec3f axis);
Accelerate the angular velocity of the Node by this axis.

Yage source files are copywritten by their specified authors and available under the terms of the GNU LGPL.
Documentation generated with CandyDoc on Wed Aug 11 11:14:29 2010