Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLNBodyCollidableNodeType

All Superinterfaces:
FrameStateListener, VRMLBoundedNodeType, VRMLChildNodeType, VRMLNode, VRMLNodeType

public interface VRMLNBodyCollidableNodeType
extends VRMLChildNodeType, VRMLBoundedNodeType

Representation of X3DCollidableNode in terms of the rigid body physics component.

See the specification definition at http://www.xj3d.org/extensions/rigid_physics.html

This class is named NBodyCollidable because there is already the generic VRMLCollidableNodeType defined in Xj3D for representing user-collidable geometry with the avatar.

The X3D node definition is:

 X3DNBodyCollidableNode : X3DChildNode, X3DBoundedObject {
   SFNode     [in,out] metadata       NULL      [X3DMetadataObject]
   SFBool     [in,out] enabled     TRUE
   SFVec3f    [in,out] position    0 0 0    (-∞,∞)
   SFRotation [in,out] rotation    0 0 1 0  [0,1]
   SFVec3f    []       bboxCenter     0 0 0     (-∞,∞)
   SFVec3f    []       bboxSize       -1 -1 -1  [0,∞) or -1 -1 -1
 }
 

Version:
$Revision: 1.3 $
Author:
Justin Couch

Method Summary
 PlaceableGeom getODEGeometry()
          Get the ODE object that represents the body to evaluate.
 float[] getRotation()
          Get the current rotation component of the transform.
 float[] getTranslation()
          Get the current translation component of the transform.
 boolean isEnabled()
          Is this group enabled for use right now?
 void setEnabled(boolean state)
          Set a new state for the enabled field
 void setRotation(float[] rot)
          Set the rotation component of the of transform.
 void setTranslation(float[] tx)
          Set the translation component of the of transform.
 void updateFromODE()
          ODE computation has finished, so go update the field values and the rendering API structures with the final computed values.
 
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
 
Methods inherited from interface org.web3d.vrml.nodes.VRMLBoundedNodeType
getBboxCenter, getBboxSize
 

Method Detail

getODEGeometry

public PlaceableGeom getODEGeometry()
Get the ODE object that represents the body to evaluate.

Returns:
The body object representing this node

updateFromODE

public void updateFromODE()
ODE computation has finished, so go update the field values and the rendering API structures with the final computed values.


isEnabled

public boolean isEnabled()
Is this group enabled for use right now?

Returns:
true if this is enabled

setEnabled

public void setEnabled(boolean state)
Set a new state for the enabled field

Parameters:
state - The new enabled value

setRotation

public void setRotation(float[] rot)
                 throws InvalidFieldValueException
Set the rotation component of the of transform. Setting a value of null is an error

Parameters:
rot - The new rotation component
Throws:
InvalidFieldValueException - The rotation was null

getRotation

public float[] getRotation()
Get the current rotation component of the transform.

Returns:
The current rotation

setTranslation

public void setTranslation(float[] tx)
                    throws InvalidFieldValueException
Set the translation component of the of transform. Setting a value of null is an error

Parameters:
tx - The new translation component
Throws:
InvalidFieldValueException - The translation was null

getTranslation

public float[] getTranslation()
Get the current translation component of the transform.

Returns:
The current translation

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium