|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.geom.hanim.HAnimObject org.j3d.geom.hanim.HAnimHumanoid
public abstract class HAnimHumanoid
Common base representation of a H-Anim Humanoid object.
The Humanoid object is defined by 6.2 Humanoid.
Derived classes must set a collection of renderer-specific values. The most critical is the output object. Internationalisation Resource Names
Field Summary | |
---|---|
protected float[] |
bboxCenter
The current bboxCenter of the segment |
protected float[] |
bboxSize
The current bboxSize of the segment |
protected boolean |
hasChildUpdates
Flag to indicate if anything has changed this frame |
protected javax.vecmath.Matrix4f |
localMatrix
Local matrix value that combines all the fields together |
protected boolean |
matrixChanged
Flag to indicate the root matrix values have changed, thus needing to regenerate the entire skeleton and vertices. |
protected int |
numSkeleton
The number of valid viewpoints of this object |
protected int |
numSkinCoords
The number of items in the coordinate list (raw number, not * 3) |
protected int |
numSkinNormals
The number of items in the coordinate list (raw number, not * 3) |
protected int |
numViewpoints
The number of valid viewpoints of this object |
protected int |
objectCount
Counter for the number of children that have requested IDs |
protected java.lang.Object |
outputCoords
Reference to the object that we place the modified coordinates in. |
protected java.lang.Object |
outputNormals
Reference to the object that we place the modified normals in. |
protected HAnimJoint |
rootJoint
This is the root joint for the skeleton |
protected HAnimObject[] |
skeleton
The current collection of the root joint and any attached sites. |
protected boolean |
skeletonChanged
Flag indicating that the skeleton (rootJoint) has had one or more of it's children change and needs to be recalculated. |
protected float[] |
skinCoords
The current coordinates of the segment |
protected float[] |
skinNormals
The current coordinates of the segment |
protected java.lang.Object[] |
viewpoints
The current collection of viewpoints nodes registered to this object. |
Fields inherited from class org.j3d.geom.hanim.HAnimObject |
---|
errorReporter, name |
Constructor Summary | |
---|---|
HAnimHumanoid()
Create a new, default instance of the site. |
Method Summary | |
---|---|
void |
childUpdateRequired(HAnimObject child)
Notification that the child has changed and will need to recalculate it's vertex positions. |
void |
getBboxCenter(float[] val)
Get the current value of the bboxCenter. |
void |
getBboxSize(float[] val)
Get the current value of the bboxSize. |
void |
getCenter(float[] val)
Get the current value of the center. |
void |
getInfo(java.lang.String[] vals)
Get the current collection of info strings. |
void |
getJoints(HAnimJoint[] vals)
Get the current collection of joints. |
void |
getRotation(float[] val)
Get the current value of the rotation. |
void |
getScale(float[] val)
Get the current value of the scale. |
void |
getScaleOrientation(float[] val)
Get the current value of the scaleOrientation. |
void |
getSegments(HAnimObject[] vals)
Get the current collection of segments. |
void |
getSites(HAnimObject[] vals)
Get the current collection of sites. |
void |
getSkeleton(HAnimObject[] vals)
Get the current collection of skeleton. |
void |
getSkinCoord(float[] val)
Get the current value of the skinCoord. |
void |
getSkinNormal(float[] val)
Get the current value of the skinNormal. |
void |
getTranslation(float[] val)
Get the current value of the translation. |
java.lang.String |
getVersion()
Get the currently set version string. |
void |
getViewpoints(java.lang.Object[] vals)
Get the current collection of viewpoints. |
int |
numInfo()
Get the number of elements in the info string array. |
int |
numJoints()
Get the number of currently valid joints. |
int |
numSegments()
Get the number of currently valid segments. |
int |
numSites()
Get the number of currently valid sites. |
int |
numSkeleton()
Get the number of currently valid skeleton. |
int |
numSkinCoord()
Get the number of elements in skinCoord |
int |
numSkinNormal()
Get the number of elements in skinNormal |
int |
numViewpoints()
Get the number of currently valid viewpoints. |
int |
requestNextObjectIndex()
Get the object's index into the greater list of things. |
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 |
setCenter(float[] val)
Set a new value for the center of this site. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the object so that any errors generated by the object can be reported in a nice, pretty fashion. |
void |
setInfo(java.lang.String[] infoStrings,
int numValid)
Set the new list of info strings. |
void |
setJoints(HAnimJoint[] kids,
int numValid)
Replace the existing joints with the new set of joints. |
void |
setRotation(float[] val)
Set a new value for the rotation of this site. |
void |
setScale(float[] val)
Set a new value for the scale of this site. |
void |
setScaleOrientation(float[] val)
Set a new value for the scaleOrientation of this site. |
void |
setSegments(HAnimSegment[] kids,
int numValid)
Replace the existing segments with the new set of segments. |
void |
setSites(HAnimSite[] kids,
int numValid)
Replace the existing sites with the new set of sites. |
void |
setSkeleton(HAnimObject[] kids,
int numValid)
Replace the existing skeleton with the new set of skeleton. |
void |
setSkinCoord(float[] val,
int numElements)
Set a new value for the skinCoord of this joint. |
void |
setSkinNormal(float[] val,
int numElements)
Set a new value for the skinNormal of this joint. |
void |
setTranslation(float[] val)
Set a new value for the translation of this site. |
void |
setVersion(java.lang.String ver)
Set the new version string for this humanoid. |
void |
setViewpoints(java.lang.Object[] kids,
int numValid)
Replace the existing viewpoints with the new set of viewpoints. |
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.HAnimObject |
---|
getName, setName, updateMatrix |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float[] bboxCenter
protected float[] bboxSize
protected float[] skinCoords
protected int numSkinCoords
protected float[] skinNormals
protected int numSkinNormals
protected java.lang.Object outputCoords
protected java.lang.Object outputNormals
protected java.lang.Object[] viewpoints
protected int numViewpoints
protected HAnimObject[] skeleton
protected int numSkeleton
protected javax.vecmath.Matrix4f localMatrix
protected HAnimJoint rootJoint
protected boolean hasChildUpdates
protected boolean matrixChanged
protected boolean skeletonChanged
protected int objectCount
Constructor Detail |
---|
public HAnimHumanoid()
Method Detail |
---|
public void childUpdateRequired(HAnimObject child)
childUpdateRequired
in interface HAnimObjectParent
child
- Reference to the child that has changedpublic int requestNextObjectIndex()
requestNextObjectIndex
in interface HAnimObjectParent
public void setErrorReporter(ErrorReporter reporter)
setErrorReporter
in class HAnimObject
reporter
- The instance to use or nullpublic void getCenter(float[] val)
val
- An array of at least length 3 to copy the value topublic void setCenter(float[] val)
val
- The new center value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getScale(float[] val)
val
- An array of at least length 3 to copy the value topublic void setScale(float[] val)
val
- The new scale value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getTranslation(float[] val)
val
- An array of at least length 3 to copy the value topublic void setTranslation(float[] val)
val
- The new translation value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getScaleOrientation(float[] val)
val
- An array of at least length 4 to copy the value topublic void setScaleOrientation(float[] val)
val
- The new scaleOrientation value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getRotation(float[] val)
val
- An array of at least length 4 to copy the value topublic void setRotation(float[] val)
val
- The new rotation value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getBboxCenter(float[] val)
val
- An array of at least length 3 to copy the value topublic void setBboxCenter(float[] val)
val
- The new bboxCenter value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getBboxSize(float[] val)
val
- An array of at least length 3 to copy the value topublic void setBboxSize(float[] val)
val
- The new bboxSize value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public java.lang.String getVersion()
public void setVersion(java.lang.String ver)
ver
- The new string to usepublic int numInfo()
public void getInfo(java.lang.String[] vals)
vals
- An array of at least length numInfo() to copy the values topublic void setInfo(java.lang.String[] infoStrings, int numValid)
infoStrings
- The collection of strings to usenumValid
- The number kids to copy from the given arraypublic int numSkinCoord()
public void getSkinCoord(float[] val)
val
- An array of at least length of numSkinCoord() * 3 to copy
the values topublic void setSkinCoord(float[] val, int numElements)
val
- The new skinCoord value to usenumElements
- The number of 3d-vectors in the array
java.lang.IllegalArgumentException
- The array is null or not long enough.public int numSkinNormal()
public void getSkinNormal(float[] val)
val
- An array of at least length of numSkinNormal() * 3 to copy
the values topublic void setSkinNormal(float[] val, int numElements)
val
- The new skinNormal value to usenumElements
- The number of 3d-vectors in the array
java.lang.IllegalArgumentException
- The array is null or not long enough.public int numViewpoints()
public void getViewpoints(java.lang.Object[] vals)
vals
- An array of at least length numViewpoints() to copy the values topublic void setViewpoints(java.lang.Object[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given arraypublic int numJoints()
public void getJoints(HAnimJoint[] vals)
vals
- An array of at least length numJoints() to copy the values topublic void setJoints(HAnimJoint[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given arraypublic int numSkeleton()
public void getSkeleton(HAnimObject[] vals)
vals
- An array of at least length numSkeleton() to copy the values topublic void setSkeleton(HAnimObject[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given array
java.lang.IllegalArgumentException
- One of the provided spublic int numSites()
public void getSites(HAnimObject[] vals)
vals
- An array of at least length numSites() to copy the values topublic void setSites(HAnimSite[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given arraypublic int numSegments()
public void getSegments(HAnimObject[] vals)
vals
- An array of at least length numSegments() to copy the values topublic void setSegments(HAnimSegment[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given arraypublic void updateSkeleton()
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |