Interface CollisionSensor
- All Superinterfaces:
X3DChildNode,X3DNode,X3DSensorNode
- All Known Implementing Classes:
CollisionSensorObject
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).
X3D node tooltip: (X3D version 3.2 or later) [X3DSensorNode] CollisionSensor generates collision-detection events.
- Hint: contains CollisionCollection node (containerField='collider').
- Hint: CollisionSensor also has output events: CollidableOffset and CollidableShape nodes (containerField='intersections'), Contact nodes (containerField='contacts').
- Hint: event timing details are explained in X3D Specification 4.4.8.3 Execution model https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/concepts.html#ExecutionModel
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 CollisionCollectiongetCollider()Provide CollisionCollection instance (using a properly typed node) from inputOutput SFNode field collider.X3DNode[]getContacts()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from outputOnly MFNode field contacts.booleangetEnabled()Provide boolean value from inputOutput SFBool field named enabled.X3DNode[]getIntersections()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) from outputOnly MFNode field intersections.booleangetIsActive()Provide boolean value from outputOnly SFBool field named isActive.X3DMetadataObjectgetMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.CollisionSensorsetCollider(CollisionCollection newValue)Accessor method to assign CollisionCollection instance (using a properly typed node) to inputOutput SFNode field collider.CollisionSensorsetEnabled(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named enabled.CollisionSensorsetMetadata(X3DMetadataObject newValue)Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
-
Method Details
-
getCollider
CollisionCollection getCollider()Provide CollisionCollection instance (using a properly typed node) from inputOutput SFNode field collider.- Returns:
- value of collider field
-
setCollider
Accessor method to assign CollisionCollection instance (using a properly typed node) to inputOutput SFNode field collider.- 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 X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) 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:
ContactObject
-
getEnabled
boolean getEnabled()Provide boolean value from inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Specified by:
getEnabledin interfaceX3DSensorNode- 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 interfaceX3DSensorNode- 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 X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) 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:
X3DNBodyCollidableNode
-
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:
getIsActivein interfaceX3DSensorNode- Returns:
- value of isActive field
-
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 interfaceX3DChildNode- Specified by:
getMetadatain interfaceX3DNode- Specified by:
getMetadatain interfaceX3DSensorNode- 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 interfaceX3DChildNode- Specified by:
setMetadatain interfaceX3DNode- Specified by:
setMetadatain interfaceX3DSensorNode- 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:
- X3D Scene Authoring Hints: Metadata Nodes
-