Interface CollisionSensor

All Superinterfaces:
X3DChildNode, X3DNode, X3DSensorNode
All Known Implementing Classes:
CollisionSensor

public interface CollisionSensor extends X3DSensorNode
CollisionSensor generates collision-detection events.

X3D node tooltip: (X3D version 3.2 or later) [X3DSensorNode] CollisionSensor generates collision-detection events.
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Provide org.web3d.x3d.sai.RigidBodyPhysics.CollisionCollection instance (using a properly typed node) from inputOutput SFNode field collider.
    Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from outputOnly MFNode field contacts.
    Provide String value from inputOutput SFString field named description.
    boolean
    Provide boolean value from inputOutput SFBool field named enabled.
    Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from outputOnly MFNode field intersections.
    boolean
    Provide boolean value from outputOnly SFBool field named isActive.
    Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    Accessor method to assign org.web3d.x3d.sai.RigidBodyPhysics.CollisionCollection instance (using a properly typed node) to inputOutput SFNode field collider.
    Accessor method to assign String value to inputOutput SFString field named description.
    setEnabled(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
  • Method Details

    • getCollider

      CollisionCollection getCollider()
      Provide org.web3d.x3d.sai.RigidBodyPhysics.CollisionCollection instance (using a properly typed node) from inputOutput SFNode field collider.

      Tooltip: [CollisionCollection] The collider field specifies a CollisionCollection node that holds a collidables field of nodes and spaces that are to be included in collision-detection computations. *
      Returns:
      value of collider field
    • setCollider

      CollisionSensor setCollider(CollisionCollection newValue)
      Accessor method to assign org.web3d.x3d.sai.RigidBodyPhysics.CollisionCollection instance (using a properly typed node) to inputOutput SFNode field collider.

      Tooltip: [CollisionCollection] The collider field specifies a CollisionCollection node that holds a collidables field of nodes and spaces that are to be included in collision-detection computations. *
      Parameters:
      newValue - is new value for the collider field.
      Returns:
      CollisionSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
    • getContacts

      X3DNode[] getContacts()
      Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from outputOnly MFNode field contacts.

      Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to Contact.
      Returns:
      value of contacts field
      See Also:
    • getDescription

      String getDescription()
      Provide String value from inputOutput SFString field named description.

      Tooltip: Author-provided prose that describes intended purpose of the node.
      • Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for " quotation-mark character).
      Specified by:
      getDescription in interface X3DSensorNode
      Returns:
      value of description field
    • setDescription

      CollisionSensor setDescription(String newValue)
      Accessor method to assign String value to inputOutput SFString field named description.

      Tooltip: Author-provided prose that describes intended purpose of the node.
      • Hint: many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for " quotation-mark character).
      Specified by:
      setDescription in interface X3DSensorNode
      Parameters:
      newValue - is new value for the description field.
      Returns:
      CollisionSensor - 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 X3DSensorNode
      Returns:
      value of enabled field
    • setEnabled

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

      X3DNode[] getIntersections()
      Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) from outputOnly MFNode field intersections.

      Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollidableNode.
      Returns:
      value of intersections field
      See Also:
    • getIsActive

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

      Tooltip: isActive true/false events are sent when sensing starts/stops.
      • 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
    • getMetadata

      X3DMetadataObject getMetadata()
      Provide org.web3d.x3d.sai.Core.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.
      Specified by:
      getMetadata in interface X3DChildNode
      Specified by:
      getMetadata in interface X3DNode
      Specified by:
      getMetadata in interface X3DSensorNode
      Returns:
      value of metadata field
      See Also:
    • setMetadata

      CollisionSensor setMetadata(X3DMetadataObject newValue)
      Accessor method to assign org.web3d.x3d.sai.Core.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.
      Specified by:
      setMetadata in interface X3DChildNode
      Specified by:
      setMetadata in interface X3DNode
      Specified by:
      setMetadata in interface X3DSensorNode
      Parameters:
      newValue - is new value for the metadata field.
      Returns:
      CollisionSensor - namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
      See Also: