org.xith3d.scenegraph.avatar
Class DefaultAvatarTransform
java.lang.Object
org.xith3d.scenegraph.avatar.DefaultAvatarTransform
- All Implemented Interfaces:
- AvatarTransform
public class DefaultAvatarTransform
- extends java.lang.Object
- implements AvatarTransform
The DefaultAvatarTransform is a standard AvatarTransform,
that translates the avatar to an offset of the View and copies
the y-rotation from the View.
|
Constructor Summary |
DefaultAvatarTransform(Node node,
float offsetY)
|
DefaultAvatarTransform(Node node,
float offsetY,
BranchGroup sceneRoot)
|
DefaultAvatarTransform(Node node,
float offsetX,
float offsetY,
float offsetZ)
|
DefaultAvatarTransform(Node node,
float offsetX,
float offsetY,
float offsetZ,
BranchGroup sceneRoot)
|
DefaultAvatarTransform(Node node,
org.openmali.vecmath2.Tuple3f offset)
|
DefaultAvatarTransform(Node node,
org.openmali.vecmath2.Tuple3f offset,
BranchGroup sceneRoot)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultAvatarTransform
public DefaultAvatarTransform(Node node,
float offsetX,
float offsetY,
float offsetZ,
BranchGroup sceneRoot)
DefaultAvatarTransform
public DefaultAvatarTransform(Node node,
float offsetX,
float offsetY,
float offsetZ)
DefaultAvatarTransform
public DefaultAvatarTransform(Node node,
float offsetY,
BranchGroup sceneRoot)
DefaultAvatarTransform
public DefaultAvatarTransform(Node node,
float offsetY)
DefaultAvatarTransform
public DefaultAvatarTransform(Node node,
org.openmali.vecmath2.Tuple3f offset,
BranchGroup sceneRoot)
DefaultAvatarTransform
public DefaultAvatarTransform(Node node,
org.openmali.vecmath2.Tuple3f offset)
getNode
public final Node getNode()
- Returns:
- the avatar's scenegraph Node.
getOffset
public final org.openmali.vecmath2.Vector3f getOffset()
- Returns:
- the translational offset of the Node to the View.
getTransformGroup
public final TransformGroup getTransformGroup()
- [
- Specified by:
getTransformGroup in interface AvatarTransform
- Returns:
- the TransformGroup, that must be added to the root BranchGroup.
transform
public void transform(Transform3D viewTransform,
float rotX,
float rotY,
org.openmali.vecmath2.Vector3f thirdPersonOffset)
- [This is called by the
FirstPersonInputHandler each frame
to transform the avatar with the View.
- Specified by:
transform in interface AvatarTransform
- Parameters:
viewTransform - the current main TRansformable's (View's) Transform3DrotX - the rotation about the x-axisrotY - the rotation about the y-axisthirdPersonOffset - the offset to the view-focus in world coordinates