Interface Collision

  • All Superinterfaces:
    X3DBoundedObject, X3DChildNode, X3DGroupingNode, X3DNode, X3DSensorNode
    All Known Implementing Classes:
    CollisionObject

    public interface Collision
    extends X3DGroupingNode, X3DSensorNode
    Abstract node interface, defined by X3D Java Scene Access Interface (SAI) Specification to support X3D Java interoperability.

    X3D node tooltip: [X3DGroupingNode,X3DSensorNode] Collision detects camera-to-object contact using current view and NavigationInfo avatarSize. Collision is a Grouping node that reports collision detection for its children.
    • Hint: Collision can contain a single proxy child node for substitute collision-detection geometry. Improve run-time performance by using proxy with simpler contact-calculation geometry.
    • Hint: proxy shapes are not rendered and remain invisible.
    • Hint: apply containerField='proxy' to uniquely identify the proxy child Shape or grouping node.
    • Warning: PointSet, IndexedLineSet, LineSet and Text are not collidable geometry do not trigger collisions.
    • Hint: NavigationInfo types '"WALK" "FLY"' support camera-to-object collision detection.
    • Hint: insert a Shape node before adding geometry or Appearance.

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

      Modifier and Type Method Description
      void addChildren​(X3DNode[] newValue)
      Add array of children 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[] getChildren()
      Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field children.
      double getCollideTime()
      Provide double value in seconds from outputOnly SFTime field named collideTime.
      boolean getEnabled()
      Provide boolean value from inputOutput SFBool field named enabled.
      boolean getIsActive()
      Provide boolean value from outputOnly SFBool field named isActive.
      X3DMetadataObject getMetadata()
      Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
      X3DChildNode getProxy()
      Provide X3DChildNode instance (using a properly typed node) from initializeOnly SFNode field proxy.
      Collision setBboxCenter​(float[] newValue)
      Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.
      Collision setBboxSize​(float[] newValue)
      Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
      void setChildren​(X3DNode newValue)
      Set single children node, replacing prior array of existing nodes (if any).
      Collision setChildren​(X3DNode[] newValue)
      Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field children.
      Collision setEnabled​(boolean newValue)
      Accessor method to assign boolean value to inputOutput SFBool field named enabled.
      Collision setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Collision setProxy​(X3DChildNode newValue)
      Accessor method to assign X3DChildNode instance (using a properly typed node) to initializeOnly SFNode field proxy.
    • Method Detail

      • setBboxCenter

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

        Collision 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 X3DGroupingNode
        Parameters:
        newValue - is new value for the bboxSize field.
        Returns:
        Collision - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • getChildren

        X3DNode[] getChildren()
        Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from inputOutput MFNode field children.

        Tooltip: [X3DChildNode] Grouping nodes contain an ordered list of children nodes.
        • Hint: Each grouping node defines a coordinate space for its children, relative to the coordinate space of its parent node. Thus transformations accumulate down the scene graph hierarchy.
        • Hint: inputOnly MFNode addChildren field can append new X3DChildNode nodes via a ROUTE connection, duplicate input nodes (i.e. matching DEF, USE values) are ignored.
        • Hint: inputOnly MFNode removeChildren field can remove nodes from the children list, unrecognized input nodes (i.e. nonmatching DEF, USE values) are ignored.
        • Hint: X3D Architecture 10.2.1 Grouping and children node types, http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#GroupingAndChildrenNodes


        Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
        Specified by:
        getChildren in interface X3DGroupingNode
        Returns:
        value of children field
        See Also:
        X3DChildNode
      • setChildren

        Collision setChildren​(X3DNode[] newValue)
        Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field children.

        Tooltip: [X3DChildNode] Grouping nodes contain an ordered list of children nodes.
        • Hint: Each grouping node defines a coordinate space for its children, relative to the coordinate space of its parent node. Thus transformations accumulate down the scene graph hierarchy.
        • Hint: inputOnly MFNode addChildren field can append new X3DChildNode nodes via a ROUTE connection, duplicate input nodes (i.e. matching DEF, USE values) are ignored.
        • Hint: inputOnly MFNode removeChildren field can remove nodes from the children list, unrecognized input nodes (i.e. nonmatching DEF, USE values) are ignored.
        • Hint: X3D Architecture 10.2.1 Grouping and children node types, http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/group.html#GroupingAndChildrenNodes


        Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
        Specified by:
        setChildren in interface X3DGroupingNode
        Parameters:
        newValue - is new value for the children field.
        Returns:
        Collision - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • addChildren

        void addChildren​(X3DNode[] newValue)
        Add array of children nodes to array of existing nodes (if any).

        Note: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DChildNode.
        Specified by:
        addChildren in interface X3DGroupingNode
        Parameters:
        newValue - is new value array to be appended the children field.
      • setChildren

        void setChildren​(X3DNode newValue)
        Set single children node, replacing prior array of existing nodes (if any).
        Specified by:
        setChildren in interface X3DGroupingNode
        Parameters:
        newValue - is new node for the children field
      • getCollideTime

        double getCollideTime()
        Provide double value in seconds from outputOnly SFTime field named collideTime.

        Tooltip: Time of collision between camera (avatar) and geometry.
        • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
        Returns:
        value of collideTime field
      • getEnabled

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

        Tooltip: Enables/disables collision detection for children and all descendants.
        • Hint: former name "collide" in VRML97 specification.
        Specified by:
        getEnabled in interface X3DSensorNode
        Returns:
        value of enabled field
      • setEnabled

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

        Tooltip: Enables/disables collision detection for children and all descendants.
        • Hint: former name "collide" in VRML97 specification.
        Specified by:
        setEnabled in interface X3DSensorNode
        Parameters:
        newValue - is new value for the enabled field.
        Returns:
        Collision - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      • getIsActive

        boolean getIsActive()
        Provide boolean value from outputOnly SFBool field named isActive.

        Tooltip: isActive true/false events are sent when triggering the sensor. isActive=true when view-object collision occurs, isActive=false when view-object collision no longer occurs.
        • Warning: it is an error to define this transient outputOnly field in an X3D file, instead only use it a source for ROUTE events.
        Specified by:
        getIsActive in interface X3DSensorNode
        Returns:
        value of isActive field
      • getProxy

        X3DChildNode getProxy()
        Provide X3DChildNode instance (using a properly typed node) from initializeOnly SFNode field proxy.

        Tooltip: [X3DChildNode] The proxy node is used as a substitute for Collision children during collision detection, simplifying collision-intersection computations.
        • Hint: The proxy node is used strictly for collision detection and is not drawn.
        • Warning: the proxy node must have containerField='proxy' or it is simply treated like other children nodes.
        • Warning: insert a Shape node before adding geometry or Appearance.
        Returns:
        value of proxy field
      • setProxy

        Collision setProxy​(X3DChildNode newValue)
        Accessor method to assign X3DChildNode instance (using a properly typed node) to initializeOnly SFNode field proxy.

        Tooltip: [X3DChildNode] The proxy node is used as a substitute for Collision children during collision detection, simplifying collision-intersection computations.
        • Hint: The proxy node is used strictly for collision detection and is not drawn.
        • Warning: the proxy node must have containerField='proxy' or it is simply treated like other children nodes.
        • Warning: insert a Shape node before adding geometry or Appearance.
        Parameters:
        newValue - is new value for the proxy field.
        Returns:
        Collision - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).