com.microcrowd.loader.java3d.max3ds.data
Class KeyFramer

java.lang.Object
  extended by com.microcrowd.loader.java3d.max3ds.data.KeyFramer

public class KeyFramer
extends java.lang.Object

Author:
Josh DeFord

Constructor Summary
KeyFramer()
           
 
Method Summary
 void addFather(int fatherID, TransformGroup newFather)
           
 Behavior createBehavior(java.lang.String meshName, Group transformGroup, java.lang.Object testObject)
          Retrieves the named object for the current key framer inserts the rotation, position and pivot transformations for frame 0 and assigns the coordinate system to it.
 void growList(int index, java.util.List list)
          Make sure the list is at least able to hold a value at index.
 boolean hasKeys()
          returns true if position keys and orientation keys are longer than one element each.
 void makeTwoListsTheSameSize(java.util.List list1, java.util.List list2)
           
 void setCoordinateSystem(java.lang.String objectName, Transform3D coordinateSystem)
          Called to set the coordinate system transform for an object named objectName.
 void setDummyObject(Group object)
           
 void setID(int id)
          Sets the id for these frames.
 void setOrientationKeys(java.util.List orientations)
          Sets the orientation information necessary for animation.s
 void setPivot(Vector3f pivot)
          Sets the pivot that will be used to as a pivot for these transfomations.
 void setPivotCenter(Point3f center)
          Sets the center of the bounding box that the pivot should offset.
 void setPosition(Point3f position)
          Sets the group that will be used to translate the mesh..
 void setPositionKeys(java.util.List positions)
          Sets the position information necessary for animation.s
 void setRotation(Quat4f rotation)
          Sets the group that will be used to center rotations.
 void setScale(Vector3f scale)
          Sets the scale for x y and z axis for objects.
 void setScaleKeys(java.util.List scaleKeys)
          Sets the scale information necessary for animation.s
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyFramer

public KeyFramer()
Method Detail

createBehavior

public Behavior createBehavior(java.lang.String meshName,
                               Group transformGroup,
                               java.lang.Object testObject)
Retrieves the named object for the current key framer inserts the rotation, position and pivot transformations for frame 0 and assigns the coordinate system to it. The inverse of the local coordinate system converts from 3ds semi-absolute coordinates (what is in the file) to local coordinates. Then these local coordinates are converted with matrix that will instantiate them to absolute coordinates: Xabs = sx a1 (Xl-Px) + sy a2 (Yl-Py) + sz a3 (Zl-Pz) + Tx Yabs = sx b1 (Xl-Px) + sy b2 (Yl-Py) + sz b3 (Zl-Pz) + Ty Zabs = sx c1 (Xl-Px) + sy c2 (Yl-Py) + sz c3 (Zl-Pz) + Tz Where: (Xabs,Yabs,Zabs) = absolute coordinate (Px,Py,Pz) = mesh pivot (constant) (X1,Y1,Z1) = local coordinates


makeTwoListsTheSameSize

public void makeTwoListsTheSameSize(java.util.List list1,
                                    java.util.List list2)

growList

public void growList(int index,
                     java.util.List list)
Make sure the list is at least able to hold a value at index.

Parameters:
index - an int specifying the initial size

setPivotCenter

public void setPivotCenter(Point3f center)
Sets the center of the bounding box that the pivot should offset.


setCoordinateSystem

public void setCoordinateSystem(java.lang.String objectName,
                                Transform3D coordinateSystem)
Called to set the coordinate system transform for an object named objectName. This is the first t


setRotation

public void setRotation(Quat4f rotation)
Sets the group that will be used to center rotations. This is applied to the mesh after all other transforms have been applied.

Parameters:
group - the group that will act as the rotation transform.

setPivot

public void setPivot(Vector3f pivot)
Sets the pivot that will be used to as a pivot for these transfomations.

Parameters:
group - the group that will act as the pivot.

setScale

public void setScale(Vector3f scale)
Sets the scale for x y and z axis for objects. This is applied to the mesh before the rotation transform has been applied.

Parameters:
group - the group that will act as the scale

setScaleKeys

public void setScaleKeys(java.util.List scaleKeys)
Sets the scale information necessary for animation.s

Parameters:
scaleKeys - a list of Vector3f, which may contain null elements, containing a position for some keys.

setPosition

public void setPosition(Point3f position)
Sets the group that will be used to translate the mesh.. This is applied to the mesh just before the rotation transform has been applied.

Parameters:
group - the group that will act as the position transform.

setPositionKeys

public void setPositionKeys(java.util.List positions)
Sets the position information necessary for animation.s

Parameters:
positions - a list of Point3f, which may contain null elements, containing a position for some keys.

setOrientationKeys

public void setOrientationKeys(java.util.List orientations)
Sets the orientation information necessary for animation.s

Parameters:
positions - a list of Quat4f, which may contain null elements, containing a orientation for some keys.

setDummyObject

public void setDummyObject(Group object)

hasKeys

public boolean hasKeys()
returns true if position keys and orientation keys are longer than one element each.


addFather

public void addFather(int fatherID,
                      TransformGroup newFather)

setID

public void setID(int id)
Sets the id for these frames.

Parameters:
id - the id for these frames.


Copyright © 2000-2011 Microcrowd. All Rights Reserved.