Interface CollidableShape

All Superinterfaces:
X3DBoundedObject, X3DChildNode, X3DNBodyCollidableNode, X3DNode
All Known Implementing Classes:
CollidableShapeObject

public interface CollidableShape
extends X3DNBodyCollidableNode
CollidableShape connects the collision detection system, the rigid body model, and the renderable scene graph.

X3D node tooltip: (X3D version 3.2 or later) [X3DNBodyCollidableNode] CollidableShape connects the collision detection system, the rigid body model, and the renderable scene graph. Contains a single Shape node (containerField='shape') for animating collidable geometry.
  • Warning: avoid changing Shape geometry at run time to prevent performance problems.
  • Warning: apply containerField='shape' to single Shape child node, not containerField='children' default.

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: CollidableShape, X3D Tooltips: CollidableShape, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    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.
    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.
    float[] getRotation()
    Provide array of 4-tuple float results unit axis, angle (in radians) from inputOutput SFRotation field named rotation.
    Shape getShape()
    Provide Shape instance (using a properly typed node) from initializeOnly SFNode field shape.
    float[] getTranslation()
    Provide array of 3-tuple float results from inputOutput SFVec3f field named translation.
    CollidableShape setBboxCenter​(float[] newValue)
    Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.
    CollidableShape setBboxSize​(float[] newValue)
    Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
    CollidableShape setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    CollidableShape setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    CollidableShape setRotation​(float[] newValue)
    Accessor method to assign 4-tuple float array unit axis, angle (in radians) to inputOutput SFRotation field named rotation.
    CollidableShape setShape​(Shape newValue)
    Accessor method to assign Shape instance (using a properly typed node) to initializeOnly SFNode field shape.
    CollidableShape setTranslation​(float[] newValue)
    Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named translation.
  • 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 X3DNBodyCollidableNode
      Returns:
      value of bboxCenter field
    • setBboxCenter

      CollidableShape 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 X3DNBodyCollidableNode
      Parameters:
      newValue - is new value for the bboxCenter field.
      Returns:
      CollidableShape - 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 X3DNBodyCollidableNode
      Returns:
      value of bboxSize field
    • setBboxSize

      CollidableShape 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 X3DNBodyCollidableNode
      Parameters:
      newValue - is new value for the bboxSize field.
      Returns:
      CollidableShape - 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:
      getEnabled in interface X3DNBodyCollidableNode
      Returns:
      value of enabled field
    • setEnabled

      CollidableShape 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 X3DNBodyCollidableNode
      Parameters:
      newValue - is new value for the enabled field.
      Returns:
      CollidableShape - 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 X3DChildNode
      Specified by:
      getMetadata in interface X3DNBodyCollidableNode
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      CollidableShape setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNBodyCollidableNode
      Specified by:
      setMetadata in interface X3DNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      CollidableShape - 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
    • getRotation

      float[] getRotation()
      Provide array of 4-tuple float results unit axis, angle (in radians) from inputOutput SFRotation field named rotation.

      Tooltip: Orientation (axis, angle in radians) of children relative to local coordinate system.
      • Hint: The order of operation is first apply the center offset, then scaleOrientation and scale, then rotation, then restore the center offset, then translation.
      Specified by:
      getRotation in interface X3DNBodyCollidableNode
      Returns:
      value of rotation field
    • setRotation

      CollidableShape setRotation​(float[] newValue)
      Accessor method to assign 4-tuple float array unit axis, angle (in radians) to inputOutput SFRotation field named rotation.

      Tooltip: Orientation (axis, angle in radians) of children relative to local coordinate system.
      • Hint: The order of operation is first apply the center offset, then scaleOrientation and scale, then rotation, then restore the center offset, then translation.
      Specified by:
      setRotation in interface X3DNBodyCollidableNode
      Parameters:
      newValue - is new value for the rotation field.
      Returns:
      CollidableShape - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getShape

      Shape getShape()
      Provide Shape instance (using a properly typed node) from initializeOnly SFNode field shape.
      Returns:
      value of shape field
    • setShape

      CollidableShape setShape​(Shape newValue)
      Accessor method to assign Shape instance (using a properly typed node) to initializeOnly SFNode field shape.
      Parameters:
      newValue - is new value for the shape field.
      Returns:
      CollidableShape - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getTranslation

      float[] getTranslation()
      Provide array of 3-tuple float results from inputOutput SFVec3f field named translation.

      Tooltip: Position (x, y, z in meters) of children relative to local coordinate system.
      • Hint: The order of operation is first apply the center offset, then scaleOrientation and scale, then rotation, then restore the center offset, then translation.
      Specified by:
      getTranslation in interface X3DNBodyCollidableNode
      Returns:
      value of translation field
    • setTranslation

      CollidableShape setTranslation​(float[] newValue)
      Accessor method to assign 3-tuple float array to inputOutput SFVec3f field named translation.

      Tooltip: Position (x, y, z in meters) of children relative to local coordinate system.
      • Hint: The order of operation is first apply the center offset, then scaleOrientation and scale, then rotation, then restore the center offset, then translation.
      Specified by:
      setTranslation in interface X3DNBodyCollidableNode
      Parameters:
      newValue - is new value for the translation field.
      Returns:
      CollidableShape - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).