|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Representation of single RigidBody object in the rigid body physics model.
See the specification definition at http://www.xj3d.org/extensions/rigid_physics.html
| Method Summary | |
VRMLNodeType[] |
getGeometry()
Get the geometry list, provides a live reference not a copy. |
VRMLNodeType |
getMassDensityModel()
Fetch the reference to the node that represents the mass density model. |
Body |
getODEBody()
Get the ODE object that represents the body to evaluate. |
int |
numGeometry()
Get the number of valid geometry that this body has as sub objects. |
void |
setGeometry(VRMLNodeType[] geometry,
int numValid)
Set the collection of geometry nodes that this body should use to render the main scene transformation. |
void |
setMassDensityModel(VRMLNodeType node)
Set the node that should be used to represent the mass density model. |
void |
setODEWorld(World wld)
Set the parent world that this body belongs to. |
void |
updateNodeFromODE()
Update the local fields after the physics model has been evaluated. |
void |
updateODEFromNode()
Update any pre-evaluation values for the body. |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType |
addNodeListener, getFieldValue, getMetadataObject, getRefCount, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount |
| Methods inherited from interface org.web3d.vrml.lang.VRMLNode |
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion |
| Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener |
allEventsComplete |
| Method Detail |
public void setODEWorld(World wld)
wld - The new world instance to use or nullpublic Body getODEBody()
public void updateODEFromNode()
public void updateNodeFromODE()
public int numGeometry()
public VRMLNodeType[] getGeometry()
public void setGeometry(VRMLNodeType[] geometry,
int numValid)
Geometry is allowed to be one of the grouping nodes or a shape node type. However, if you provide something like a LOD or Switch, don't expect anything to actually work correctly.
geometry - Array of new geometry node instances to usenumValid - The number of valid values to get from the array
InvalidFieldValueException - one of the provided nodes is not a
X3DRigidBodyNode instancepublic VRMLNodeType getMassDensityModel()
public void setMassDensityModel(VRMLNodeType node)
throws InvalidFieldValueException
The valid body nodes are Sphere, Box and Cone.
node - The new instance to use or null
InvalidFieldValueException - This was not a valid node type
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||