org.xith3d.scenegraph.avatar
Class DefaultAvatarTransform

java.lang.Object
  extended by 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)
           
 
Method Summary
 Node getNode()
           
 org.openmali.vecmath2.Vector3f getOffset()
           
 TransformGroup getTransformGroup()
          [
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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) Transform3D
rotX - the rotation about the x-axis
rotY - the rotation about the y-axis
thirdPersonOffset - the offset to the view-focus in world coordinates