Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.geom.hanim
Class AVHumanoid

java.lang.Object
  extended by org.j3d.geom.hanim.HAnimObject
      extended by org.j3d.geom.hanim.HAnimHumanoid
          extended by org.j3d.renderer.aviatrix3d.geom.hanim.AVHumanoid
All Implemented Interfaces:
NodeUpdateListener, org.j3d.geom.hanim.HAnimObjectParent
Direct Known Subclasses:
SoftwareHumanoid

public abstract class AVHumanoid
extends org.j3d.geom.hanim.HAnimHumanoid
implements NodeUpdateListener

Common AV3D implementation of the Humanoid object that may be extended for either shader or software implementation additions.

Implements a rootTransform group to hold the geometry and rootTransformation required by the Site object. The output objects are always FloatBuffers for direct passing to OpenGL.

Version:
$Revision: 1.5 $
Author:
Justin Couch

Field Summary
 
Fields inherited from class org.j3d.geom.hanim.HAnimHumanoid
bboxCenter, bboxSize, hasChildUpdates, localMatrix, matrixChanged, numSkeleton, numSkinCoords, numSkinNormals, numViewpoints, objectCount, outputCoords, outputNormals, rootJoint, skeleton, skeletonChanged, skinCoords, skinNormals, viewpoints
 
Fields inherited from class org.j3d.geom.hanim.HAnimObject
errorReporter, name
 
Method Summary
protected  java.nio.FloatBuffer createBuffer(int size)
          Convenience method to allocate a NIO buffer for the vertex handling that handles floats.
 Node getSceneGraphObject()
          Get the implemented scene graph object for this humanoid so that it can be added directly to the scene.
 void setBboxCenter(float[] val)
          Set a new value for the bboxCenter of this segment.
 void setBboxSize(float[] val)
          Set a new value for the bboxSize of this segment.
 void setSkeleton(org.j3d.geom.hanim.HAnimObject[] kids, int numValid)
          Replace the existing viewpoints with the new set of viewpoints.
abstract  void setSkin(Node[] skins, int numSkins)
          Set the list of geometry that should be used by this humanoid.
 void setViewpoints(java.lang.Object[] vps, int numValid)
          Replace the existing skeleton with the new set of sites and joints.
 void updateNodeBoundsChanges(java.lang.Object src)
          Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.
 void updateNodeDataChanges(java.lang.Object src)
          Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.
 void updateSkeleton()
          All the skeletal changes are in for this frame, so update the matrix values now.
 
Methods inherited from class org.j3d.geom.hanim.HAnimHumanoid
childUpdateRequired, getBboxCenter, getBboxSize, getCenter, getInfo, getJoints, getRotation, getScale, getScaleOrientation, getSegments, getSites, getSkeleton, getSkinCoord, getSkinNormal, getTranslation, getVersion, getViewpoints, numInfo, numJoints, numSegments, numSites, numSkeleton, numSkinCoord, numSkinNormal, numViewpoints, requestNextObjectIndex, setCenter, setErrorReporter, setInfo, setJoints, setRotation, setScale, setScaleOrientation, setSegments, setSites, setSkinCoord, setSkinNormal, setTranslation, setVersion
 
Methods inherited from class org.j3d.geom.hanim.HAnimObject
getName, setName, updateMatrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

updateNodeBoundsChanges

public void updateNodeBoundsChanges(java.lang.Object src)
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.

Specified by:
updateNodeBoundsChanges in interface NodeUpdateListener
Parameters:
src - The node or Node Component that is to be updated.

updateNodeDataChanges

public void updateNodeDataChanges(java.lang.Object src)
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.

Specified by:
updateNodeDataChanges in interface NodeUpdateListener
Parameters:
src - The node or Node Component that is to be updated.

setBboxCenter

public void setBboxCenter(float[] val)
Set a new value for the bboxCenter of this segment. If the array is null or not long enough an exception is generated. The array must be at least 3 units long, and the bboxCenter is taken from the 1st three values.

Overrides:
setBboxCenter in class org.j3d.geom.hanim.HAnimHumanoid
Parameters:
val - The new bboxCenter value to use
Throws:
java.lang.IllegalArgumentException - The array is null or not long enough.

setBboxSize

public void setBboxSize(float[] val)
Set a new value for the bboxSize of this segment. If the array is null or not long enough an exception is generated. The array must be at least 3 units long, and the bboxSize is taken from the 1st three values.

Overrides:
setBboxSize in class org.j3d.geom.hanim.HAnimHumanoid
Parameters:
val - The new bboxSize value to use
Throws:
java.lang.IllegalArgumentException - The array is null or not long enough.

setViewpoints

public void setViewpoints(java.lang.Object[] vps,
                          int numValid)
Replace the existing skeleton with the new set of sites and joints. Viewpoints must be an instance of an Aviatrix3D Node.

Overrides:
setViewpoints in class org.j3d.geom.hanim.HAnimHumanoid
Parameters:
vps - The collection of viewpoints objects to now use
numValid - The number kids to copy from the given array

setSkeleton

public void setSkeleton(org.j3d.geom.hanim.HAnimObject[] kids,
                        int numValid)
Replace the existing viewpoints with the new set of viewpoints.

Overrides:
setSkeleton in class org.j3d.geom.hanim.HAnimHumanoid
Parameters:
kids - The collection of child objects to now use
numValid - The number kids to copy from the given array

updateSkeleton

public void updateSkeleton()
All the skeletal changes are in for this frame, so update the matrix values now. If nothing has changed, don't bother doing any calculations and return immediately.

Overrides:
updateSkeleton in class org.j3d.geom.hanim.HAnimHumanoid

getSceneGraphObject

public Node getSceneGraphObject()
Get the implemented scene graph object for this humanoid so that it can be added directly to the scene.

Returns:
The scene graph object to use

setSkin

public abstract void setSkin(Node[] skins,
                             int numSkins)
Set the list of geometry that should be used by this humanoid. Depending on the underlying implementation of the skinned mesh algorithm, these may or may not be directly inserted into the scene graph. When skinned mesh animation takes place, the coordinates are automatically fed from this humanoid to the appropriate geometry. For best performance, the geometry should make use of the BufferGeometry geometry representation.

Parameters:
skins - List of representative shapes to use

createBuffer

protected java.nio.FloatBuffer createBuffer(int size)
Convenience method to allocate a NIO buffer for the vertex handling that handles floats.

Parameters:
size - The number of floats to have in the array

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org