Interface CollisionSpace
- All Superinterfaces:
X3DBoundedObject,X3DNBodyCollisionSpaceNode,X3DNode
- All Known Implementing Classes:
CollisionSpaceObject
public interface CollisionSpace extends X3DNBodyCollisionSpaceNode
CollisionSpace holds collection of objects considered together for resolution of inter-object collisions.
X3D node tooltip: (X3D version 3.2 or later) [X3DNBodyCollisionSpaceNode] CollisionSpace holds collection of objects considered together for resolution of inter-object collisions. Contains multiple CollidableShape, CollidableOffset, or CollisionSpace nodes (containerField='collidables'). *
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
X3D node tooltip: (X3D version 3.2 or later) [X3DNBodyCollisionSpaceNode] CollisionSpace holds collection of objects considered together for resolution of inter-object collisions. Contains multiple CollidableShape, CollidableOffset, or CollisionSpace nodes (containerField='collidables'). *
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
-
Method Summary
Modifier and Type Method Description voidaddCollidables(X3DNode[] newValue)Add array of child collidables nodes to array of existing nodes (if any).float[]getBboxCenter()Provide array of 3-tuple float results from initializeOnly SFVec3f field named bboxCenter.float[]getBboxSize()Provide array of 3-tuple float results within allowed range of [0,infinity), or default value [-1 -1 -1], from initializeOnly SFVec3f field named bboxSize.X3DNode[]getCollidables()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) with acceptable node types limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode, from inputOutput MFNode field collidables.booleangetDisplayBBox()Provide boolean value from inputOutput SFBool field named displayBBox.booleangetEnabled()Provide boolean value from inputOutput SFBool field named enabled.X3DMetadataObjectgetMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.booleangetUseGeometry()Provide boolean value from inputOutput SFBool field named useGeometry.booleangetVisible()Provide boolean value from inputOutput SFBool field named visible.CollisionSpacesetBboxCenter(float[] newValue)Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.CollisionSpacesetBboxSize(float[] newValue)Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.voidsetCollidables(X3DNode newValue)Set single child collidables node, replacing prior array of existing nodes (if any).CollisionSpacesetCollidables(X3DNode[] newValue)Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field collidables. // newValueInstanceAcceptableNodeTypesTest checks are needed for methods that override/subset X3DNode interfaces #1 boolean isNodeTypeAllowed = (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollisionSpaceNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollidableNode); if (!CollisionSpacesetDisplayBBox(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named displayBBox.CollisionSpacesetEnabled(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named enabled.CollisionSpacesetMetadata(X3DMetadataObject newValue)Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.CollisionSpacesetUseGeometry(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named useGeometry.CollisionSpacesetVisible(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named visible.
-
Method Details
-
getBboxCenter
float[] getBboxCenter()Provide array of 3-tuple float results from initializeOnly SFVec3f field named bboxCenter.
Tooltip: Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#X3DBoundedObject
- Specified by:
getBboxCenterin interfaceX3DBoundedObject- Specified by:
getBboxCenterin interfaceX3DNBodyCollisionSpaceNode- Returns:
- value of bboxCenter field
-
setBboxCenter
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.
Tooltip: Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#X3DBoundedObject
- Specified by:
setBboxCenterin interfaceX3DBoundedObject- Specified by:
setBboxCenterin interfaceX3DNBodyCollisionSpaceNode- Parameters:
newValue- is new value for the bboxCenter field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBboxSize
float[] getBboxSize()Provide array of 3-tuple float results within allowed range of [0,infinity), or default value [-1 -1 -1], from initializeOnly SFVec3f field named bboxSize.
Tooltip: Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.- Hint: can be useful for collision computations or inverse-kinematics (IK) engines.
- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#X3DBoundedObject
- Specified by:
getBboxSizein interfaceX3DBoundedObject- Specified by:
getBboxSizein interfaceX3DNBodyCollisionSpaceNode- Returns:
- value of bboxSize field
-
setBboxSize
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
Tooltip: Bounding box size is usually omitted, and can easily be calculated automatically by an X3D player at scene-loading time with minimal computational cost. Bounding box size can also be defined as an optional authoring hint that suggests an optimization or constraint.- Hint: can be useful for collision computations or inverse-kinematics (IK) engines.
- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#X3DBoundedObject
- Specified by:
setBboxSizein interfaceX3DBoundedObject- Specified by:
setBboxSizein interfaceX3DNBodyCollisionSpaceNode- Parameters:
newValue- is new value for the bboxSize field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCollidables
X3DNode[] getCollidables()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) with acceptable node types limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode, from inputOutput MFNode field collidables.
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode.- Returns:
- value of collidables field
- See Also:
X3DNBodyCollisionSpaceNode,X3DNBodyCollidableNode
-
setCollidables
Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field collidables. // newValueInstanceAcceptableNodeTypesTest checks are needed for methods that override/subset X3DNode interfaces #1 boolean isNodeTypeAllowed = (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollisionSpaceNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollidableNode); if (!isNodeTypeAllowed) { throw new org.web3d.x3d.sai.InvalidFieldValueException("X3DNode newValue is not instanceof " + "acceptableNodeTypes X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode; newValue=" + newValue); }
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode.- Parameters:
newValue- is new value for the collidables field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addCollidables
Add array of child collidables nodes to array of existing nodes (if any).
Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode.- Parameters:
newValue- is new value array to be appended the collidables field.
-
setCollidables
Set single child collidables node, replacing prior array of existing nodes (if any).- Parameters:
newValue- is new node for the collidables field
-
getDisplayBBox
boolean getDisplayBBox()Provide boolean value from inputOutput SFBool field named displayBBox.- Specified by:
getDisplayBBoxin interfaceX3DBoundedObject- Specified by:
getDisplayBBoxin interfaceX3DNBodyCollisionSpaceNode- Returns:
- value of displayBBox field
-
setDisplayBBox
Accessor method to assign boolean value to inputOutput SFBool field named displayBBox.- Specified by:
setDisplayBBoxin interfaceX3DBoundedObject- Specified by:
setDisplayBBoxin interfaceX3DNBodyCollisionSpaceNode- Parameters:
newValue- is new value for the displayBBox field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
getEnabledin interfaceX3DNBodyCollisionSpaceNode- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
setEnabledin interfaceX3DNBodyCollisionSpaceNode- Parameters:
newValue- is new value for the enabled field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getMetadata
X3DMetadataObject getMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
getMetadatain interfaceX3DNBodyCollisionSpaceNode- Specified by:
getMetadatain interfaceX3DNode- Returns:
- value of metadata field
- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
setMetadata
Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
Tooltip: [X3DMetadataObject] Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/core.html#Metadata
- Specified by:
setMetadatain interfaceX3DNBodyCollisionSpaceNode- Specified by:
setMetadatain interfaceX3DNode- Parameters:
newValue- is new value for the metadata field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
- X3D Scene Authoring Hints: Metadata Nodes
-
getUseGeometry
boolean getUseGeometry()Provide boolean value from inputOutput SFBool field named useGeometry.
Tooltip: useGeometry indicates whether collision-detection code checks down to level of geometry, or only make approximations using geometry bounds.- Hint: testing against object bounds is usually sufficient.
- Warning: using geometry is more accurate but slower.
- Returns:
- value of useGeometry field
-
setUseGeometry
Accessor method to assign boolean value to inputOutput SFBool field named useGeometry.
Tooltip: useGeometry indicates whether collision-detection code checks down to level of geometry, or only make approximations using geometry bounds.- Hint: testing against object bounds is usually sufficient.
- Warning: using geometry is more accurate but slower.
- Parameters:
newValue- is new value for the useGeometry field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getVisible
boolean getVisible()Provide boolean value from inputOutput SFBool field named visible.- Specified by:
getVisiblein interfaceX3DBoundedObject- Specified by:
getVisiblein interfaceX3DNBodyCollisionSpaceNode- Returns:
- value of visible field
-
setVisible
Accessor method to assign boolean value to inputOutput SFBool field named visible.- Specified by:
setVisiblein interfaceX3DBoundedObject- Specified by:
setVisiblein interfaceX3DNBodyCollisionSpaceNode- Parameters:
newValue- is new value for the visible field.- Returns:
CollisionSpace- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-