Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLNBodyCollidableNodeType

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

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
 org.odejava.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.VRMLBoundedNodeType
getBboxCenter, getBboxSize
 

Method Detail

getODEGeometry

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

Returns:
The body object representing this node

updateFromODE

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


isEnabled

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

Returns:
true if this is enabled

setEnabled

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

Parameters:
state - The new enabled value

setRotation

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

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

Returns:
The current rotation

setTranslation

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

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

Returns:
The current translation

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium