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).
See Also:
SAI Java Specification: TODO, X3D Abstract Specification: CollisionSpace, X3D Tooltips: CollisionSpace, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    void addCollidables​(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.
    boolean getEnabled()
    Provide boolean value from inputOutput SFBool field named enabled.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    boolean getUseGeometry()
    Provide boolean value from inputOutput SFBool field named useGeometry.
    CollisionSpace setBboxCenter​(float[] newValue)
    Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.
    CollisionSpace setBboxSize​(float[] newValue)
    Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
    void setCollidables​(X3DNode newValue)
    Set single child collidables node, replacing prior array of existing nodes (if any).
    CollisionSpace setCollidables​(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 (!
    CollisionSpace setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    CollisionSpace setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    CollisionSpace setUseGeometry​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named useGeometry.
  • 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.
      Specified by:
      getBboxCenter in interface X3DBoundedObject
      Specified by:
      getBboxCenter in interface X3DNBodyCollisionSpaceNode
      Returns:
      value of bboxCenter field
    • setBboxCenter

      CollisionSpace setBboxCenter​(float[] newValue)
      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.
      Specified by:
      setBboxCenter in interface X3DBoundedObject
      Specified by:
      setBboxCenter in interface X3DNBodyCollisionSpaceNode
      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.
      Specified by:
      getBboxSize in interface X3DBoundedObject
      Specified by:
      getBboxSize in interface X3DNBodyCollisionSpaceNode
      Returns:
      value of bboxSize field
    • setBboxSize

      CollisionSpace setBboxSize​(float[] newValue)
      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.
      Specified by:
      setBboxSize in interface X3DBoundedObject
      Specified by:
      setBboxSize in interface X3DNBodyCollisionSpaceNode
      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

      CollisionSpace setCollidables​(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 (!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

      void addCollidables​(X3DNode[] newValue)
      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

      void setCollidables​(X3DNode newValue)
      Set single child collidables node, replacing prior array of existing nodes (if any).
      Parameters:
      newValue - is new node for the collidables field
    • getEnabled

      boolean getEnabled()
      Provide boolean value from inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      getEnabled in interface X3DNBodyCollisionSpaceNode
      Returns:
      value of enabled field
    • setEnabled

      CollisionSpace setEnabled​(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enabled.

      Tooltip: Enables/disables node operation. *
      Specified by:
      setEnabled in interface X3DNBodyCollisionSpaceNode
      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.
      Specified by:
      getMetadata in interface X3DNBodyCollisionSpaceNode
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      CollisionSpace setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Specified by:
      setMetadata in interface X3DNBodyCollisionSpaceNode
      Specified by:
      setMetadata in interface X3DNode
      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

      CollisionSpace setUseGeometry​(boolean newValue)
      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).