|
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.HAnimSegment
public class HAnimSegment
Representation of a H-Anim Segment object.
The segment object is defined by 6.5 Segment. Internationalisation Resource Names
Field Summary | |
---|---|
protected float[] |
bboxCenter
The current bboxCenter of the segment |
protected float[] |
bboxSize
The current bboxSize of the segment |
protected java.lang.Object[] |
children
The current collection of children nodes registered to this object. |
protected int |
numChildren
The number of valid children of this object |
Fields inherited from class org.j3d.geom.hanim.HAnimObject |
---|
errorReporter, name |
Constructor Summary | |
---|---|
HAnimSegment()
Create a new, default instance of the segment. |
Method Summary | |
---|---|
void |
addChild(java.lang.Object kid)
Add a child node to the existing collection. |
void |
getBboxCenter(float[] val)
Get the current value of the bboxCenter. |
void |
getBboxSize(float[] val)
Get the current value of the bboxSize. |
void |
getCenterOfMass(float[] val)
Get the current value of the centerOfMass. |
void |
getChildren(java.lang.Object[] vals)
Get the current collection of children. |
void |
getCoord(float[] val)
Get the current value of the coord. |
float |
getMass()
Get the current value of the mass of the segment. |
void |
getMomentsOfInertia(float[] val)
Get the current value of the momentsOfInertia. |
int |
numChildren()
Get the number of currently valid children. |
int |
numCoord()
Get the number of elements in coord |
int |
numMomentsOfInertia()
|
void |
removeChild(java.lang.Object kid)
Remove a child node from the existing collection. |
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 |
setCenterOfMass(float[] val)
Set a new value for the centerOfMass of this segment. |
void |
setChildren(java.lang.Object[] kids,
int numValid)
Replace the existing children with the new set of children. |
void |
setCoord(float[] val,
int numElements)
Set a new value for the coord of this joint. |
void |
setDisplacers(HAnimDisplacer[] kids,
int numValid)
Replace the existing displacers with the new set of displacers. |
void |
setMass(float val)
Set a new value for the mass of this segment. |
void |
setMomentsOfInertia(float[] val,
int numValid)
Set a new value for the momentsOfInertia of this segment. |
Methods inherited from class org.j3d.geom.hanim.HAnimObject |
---|
getName, setErrorReporter, 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 java.lang.Object[] children
protected int numChildren
Constructor Detail |
---|
public HAnimSegment()
Method Detail |
---|
public float getMass()
public void setMass(float val)
val
- The new mass value to usepublic 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)
If the three values are all -1, then this will disable the use of the explicit bounds.
val
- The new bboxSize value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public void getCenterOfMass(float[] val)
val
- An array of at least length 3 to copy the value topublic void setCenterOfMass(float[] val)
val
- The new centerOfMass value to use
java.lang.IllegalArgumentException
- The array is null or not long enough.public int numMomentsOfInertia()
public void getMomentsOfInertia(float[] val)
val
- An array of at least numMomentsOfInteria() in lengthpublic void setMomentsOfInertia(float[] val, int numValid)
val
- The new momentsOfInertia value to usenumValid
- The number of valid values to copy from the array
java.lang.IllegalArgumentException
- The array is null or not long enough.public int numCoord()
public void getCoord(float[] val)
val
- An array of at least length of numCoord() * 3 to copy
the values topublic void setCoord(float[] val, int numElements)
val
- The new coord value to usenumElements
- The number of 3d-vectors in the array
java.lang.IllegalArgumentException
- The array is null or not long enough.public int numChildren()
public void getChildren(java.lang.Object[] vals)
vals
- An array of at least length numChildren() to copy the values topublic void setChildren(java.lang.Object[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given arraypublic void addChild(java.lang.Object kid)
kid
- The new child instance to addpublic void removeChild(java.lang.Object kid)
kid
- The child instance to removepublic void setDisplacers(HAnimDisplacer[] kids, int numValid)
kids
- The collection of child objects to now usenumValid
- The number kids to copy from the given array
|
j3d.org Code | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |