Class OGLCollidableOffset
java.lang.Object
org.web3d.vrml.renderer.common.nodes.AbstractNode
org.web3d.vrml.renderer.common.nodes.rigidphysics.BaseCollidableNode
org.web3d.vrml.renderer.common.nodes.rigidphysics.BaseCollidableOffset
org.web3d.vrml.renderer.ogl.nodes.rigidphysics.OGLCollidableOffset
- All Implemented Interfaces:
org.j3d.aviatrix3d.NodeUpdateListener
,VRMLNode
,FrameStateListener
,VRMLBoundedNodeType
,VRMLChildNodeType
,VRMLNBodyCollidableNodeType
,VRMLNodeType
,VRMLWorldRootChildNodeType
,OGLVRMLNode
public class OGLCollidableOffset
extends BaseCollidableOffset
implements OGLVRMLNode, org.j3d.aviatrix3d.NodeUpdateListener
Implementation of a CollidableOffset.
- Version:
- $Revision: 1.3 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from class org.web3d.vrml.renderer.common.nodes.rigidphysics.BaseCollidableOffset
COLLIDABLE_NODE_MSG, COLLIDABLE_PROTO_MSG, FIELD_COLLIDABLE, LAST_OFFSET_INDEX, pCollidable, vfCollidable
Fields inherited from class org.web3d.vrml.renderer.common.nodes.rigidphysics.BaseCollidableNode
FIELD_BBOX_CENTER, FIELD_BBOX_DISPLAY, FIELD_BBOX_SIZE, FIELD_ENABLED, FIELD_ROTATION, FIELD_TRANSLATION, FIELD_VISIBLE, LAST_COLLIDABLE_INDEX, odeGeom, tmatrix, vfBboxCenter, vfBboxDisplay, vfBboxSize, vfEnabled, vfRotation, vfTranslation, vfVisible
Fields inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
errorReporter, FIELD_METADATA, fieldLocalData, hasChanged, inSetup, isDEF, isStatic, LAST_NODE_INDEX, layerIds, nodeName, pMetadata, refCounts, removedLayerIds, stateManager, STATIC_SCENE_GRAPH, vfMetadata, vrmlMajorVersion, vrmlMinorVersion
-
Constructor Summary
ConstructorsConstructorDescriptionInitialise the time dependent node and it's fields that are held locally.Construct a new instance of this node based on the details from the given node. -
Method Summary
Modifier and TypeMethodDescriptionvoid
The end of the frame has been reached, update the matrix now.org.j3d.aviatrix3d.SceneGraphObject
Get the OpenGL scene graph object representation of this node.protected void
Set node content for the collidable field.void
Notification that the construction phase of this node has finished.void
ODE computation has finished, so go update the field values and the rendering API structures with the final computed values.void
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.void
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.Methods inherited from class org.web3d.vrml.renderer.common.nodes.rigidphysics.BaseCollidableOffset
getFieldDeclaration, getFieldIndex, getFieldValue, getNodeFieldIndices, getNumFields, setValue
Methods inherited from class org.web3d.vrml.renderer.common.nodes.rigidphysics.BaseCollidableNode
copy, getBboxCenter, getBboxDisplay, getBboxSize, getODEGeometry, getPrimaryType, getRotation, getTranslation, getVisible, isEnabled, isShared, sendRoute, setBboxCenter, setBboxDisplay, setBboxSize, setEnabled, setRotation, setShared, setTranslation, setValue, setValue, setVisible, updateMatrix
Methods inherited from class org.web3d.vrml.renderer.common.nodes.AbstractNode
addNodeListener, checkNodeType, checkSecondaryType, checkSecondaryType, clearRemovedLayerIds, fireFieldChanged, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, getSecondaryType, getUserData, getVRMLNodeName, hasFieldChanged, isDEF, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, setDEF, setErrorReporter, setFrameStateManager, setMetadataObject, setUserData, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVersion, throwInitOnlyWriteException, throwInputOnlyWriteException, throwInvalidNodeException, throwInvalidProtoException, throwOutputOnlyWriteException, updateRefCount, updateRefs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.VRMLNodeType
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount
-
Constructor Details
-
OGLCollidableOffset
public OGLCollidableOffset()Initialise the time dependent node and it's fields that are held locally. -
OGLCollidableOffset
Construct a new instance of this node based on the details from the given node. If the node is not the same type, an exception will be thrown.- Parameters:
node
- The node to copy- Throws:
IllegalArgumentException
- The node is not the same type
-
-
Method Details
-
updateFromODE
public void updateFromODE()ODE computation has finished, so go update the field values and the rendering API structures with the final computed values.- Specified by:
updateFromODE
in interfaceVRMLNBodyCollidableNodeType
- Overrides:
updateFromODE
in classBaseCollidableNode
-
updateNodeBoundsChanges
Notification that its safe to update the node now with any operations that could potentially effect the node's bounds.- Specified by:
updateNodeBoundsChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
updateNodeDataChanges
Notification that its safe to update the node now with any operations that only change the node's properties, but do not change the bounds.- Specified by:
updateNodeDataChanges
in interfaceorg.j3d.aviatrix3d.NodeUpdateListener
- Parameters:
src
- The node or Node Component that is to be updated.
-
allEventsComplete
public void allEventsComplete()The end of the frame has been reached, update the matrix now.- Specified by:
allEventsComplete
in interfaceFrameStateListener
- Overrides:
allEventsComplete
in classBaseCollidableNode
-
setupFinished
public void setupFinished()Notification that the construction phase of this node has finished. If the node would like to do any internal processing, such as setting up geometry, then go for it now.- Specified by:
setupFinished
in interfaceVRMLNodeType
- Overrides:
setupFinished
in classBaseCollidableOffset
-
getSceneGraphObject
public org.j3d.aviatrix3d.SceneGraphObject getSceneGraphObject()Get the OpenGL scene graph object representation of this node. This will need to be cast to the appropriate parent type when being used. Default implementation returns null.- Specified by:
getSceneGraphObject
in interfaceOGLVRMLNode
- Returns:
- The OpenGL representation.
-
setCollidable
Set node content for the collidable field.- Overrides:
setCollidable
in classBaseCollidableOffset
- Parameters:
col
- The new collidable object- Throws:
InvalidFieldValueException
- The node does not match the required type.
-