Interface CollisionCollection
- All Superinterfaces:
X3DBoundedObject
,X3DChildNode
,X3DNode
- All Known Implementing Classes:
CollisionCollection
CollisionCollection holds a collection of objects that can be managed as a single entity for resolution of inter-object collisions.
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
Package hint: This interface is defined by the X3D Java Language Binding Specification for the Scene Authoring Interface (SAI).
Warning: this is an abstract interface that cannot be instantiated as a concrete object. Java programmers typically only need to use concrete objects provided by the
org.web3d.x3d.jsail
classes.
CollisionCollection node tooltip: (X3D version 3.2 or later) [X3DChildNode,X3DBoundedObject] CollisionCollection holds a collection of objects that can be managed as a single entity for resolution of inter-object collisions.
- Hint: contains an array of CollisionSpace, CollidableShape or CollidableOffset nodes (containerField='collidables').
- Hint: content must be visible to be collidable and to be pickable.
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 TypeMethodDescriptionvoid
addCollidables
(X3DNode[] newValue) Add array of child collidables nodes to array of existing nodes (if any).String[]
Provide array of String enumeration results (baseType MFString) ['"BOUNCE"' | '"USER_FRICTION"' | '"FRICTION_COEFFICIENT-2"' | '"ERROR_REDUCTION"' | '"CONSTANT_FORCE"' | '"SPEED-1"' | '"SPEED-2"' | '"SLIP-1"' | '"SLIP-2"'] from inputOutput MFString field named appliedParameters.float[]
Provide array of 3-tuple float results from initializeOnly SFVec3f field named bboxCenter.boolean
Provide boolean value from inputOutput SFBool field named bboxDisplay.float[]
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.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named bounce.X3DNode[]
Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) with acceptable node types limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode, from inputOutput MFNode field collidables.Provide String value from inputOutput SFString field named description.boolean
Provide boolean value from inputOutput SFBool field named enabled.float[]
Provide array of 2-tuple float results within allowed range of [0,infinity) from inputOutput SFVec2f field named frictionCoefficients.Provide org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.float
Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minBounceSpeed.float[]
Provide array of 2-tuple float results from inputOutput SFVec2f field named slipFactors.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessConstantForceMix.float
Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessErrorCorrection.float[]
Provide array of 2-tuple float results from inputOutput SFVec2f field named surfaceSpeed.boolean
Provide boolean value from inputOutput SFBool field named visible.setAppliedParameters
(String[] newValue) Accessor method to assign String enumeration array (""BOUNCE"" | ""USER_FRICTION"" | ""FRICTION_COEFFICIENT-2"" | ""ERROR_REDUCTION"" | ""CONSTANT_FORCE"" | ""SPEED-1"" | ""SPEED-2"" | ""SLIP-1"" | ""SLIP-2"") to inputOutput MFString field named appliedParameters.setBboxCenter
(float[] newValue) Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.setBboxDisplay
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named bboxDisplay.setBboxSize
(float[] newValue) Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.setBounce
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named bounce.void
setCollidables
(X3DNode newValue) Set single child collidables node, replacing prior array of existing nodes (if any).setCollidables
(X3DNode[] newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field collidables.setDescription
(String newValue) 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.setFrictionCoefficients
(float[] newValue) Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named frictionCoefficients.setMetadata
(X3DMetadataObject newValue) Accessor method to assign org.web3d.x3d.sai.Core.X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.setMinBounceSpeed
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named minBounceSpeed.setSlipFactors
(float[] newValue) Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named slipFactors.setSoftnessConstantForceMix
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named softnessConstantForceMix.setSoftnessErrorCorrection
(float newValue) Accessor method to assign float value to inputOutput SFFloat field named softnessErrorCorrection.setSurfaceSpeed
(float[] newValue) Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named surfaceSpeed.setVisible
(boolean newValue) Accessor method to assign boolean value to inputOutput SFBool field named visible.
-
Method Details
-
getAppliedParameters
String[] getAppliedParameters()Provide array of String enumeration results (baseType MFString) ['"BOUNCE"' | '"USER_FRICTION"' | '"FRICTION_COEFFICIENT-2"' | '"ERROR_REDUCTION"' | '"CONSTANT_FORCE"' | '"SPEED-1"' | '"SPEED-2"' | '"SLIP-1"' | '"SLIP-2"'] from inputOutput MFString field named appliedParameters.
Tooltip: Default global parameters for collision outputs of rigid body physics system. Contact node can override parent CollisionCollection node. Selectable values for array: "BOUNCE" "USER_FRICTION" "FRICTION_COEFFICIENT_2" "ERROR_REDUCTION" "CONSTANT_FORCE" "SPEED_1" "SPEED_2" "SLIP_1" "SLIP_2".- Hint: BOUNCE: bounce value is used; USER_FRICTION: apply user-supplied value; FRICTION_COEFFICIENT_2: apply frictionCoefficients values; ERROR_REDUCTION: apply softnessErrorCorrection value; CONSTANT_FORCE: apply softnessConstantForceMix value; SPEED_1: apply first component of surfaceSpeed array; SPEED_2: apply second component of surfaceSpeed array; SLIP_1: apply first component of slipFactors array; SLIP_2: apply second component of slipFactors array.
- Returns:
- value of appliedParameters field
-
setAppliedParameters
Accessor method to assign String enumeration array (""BOUNCE"" | ""USER_FRICTION"" | ""FRICTION_COEFFICIENT-2"" | ""ERROR_REDUCTION"" | ""CONSTANT_FORCE"" | ""SPEED-1"" | ""SPEED-2"" | ""SLIP-1"" | ""SLIP-2"") to inputOutput MFString field named appliedParameters.
Tooltip: Default global parameters for collision outputs of rigid body physics system. Contact node can override parent CollisionCollection node. Selectable values for array: "BOUNCE" "USER_FRICTION" "FRICTION_COEFFICIENT_2" "ERROR_REDUCTION" "CONSTANT_FORCE" "SPEED_1" "SPEED_2" "SLIP_1" "SLIP_2".- Hint: BOUNCE: bounce value is used; USER_FRICTION: apply user-supplied value; FRICTION_COEFFICIENT_2: apply frictionCoefficients values; ERROR_REDUCTION: apply softnessErrorCorrection value; CONSTANT_FORCE: apply softnessConstantForceMix value; SPEED_1: apply first component of surfaceSpeed array; SPEED_2: apply second component of surfaceSpeed array; SLIP_1: apply first component of slipFactors array; SLIP_2: apply second component of slipFactors array.
- Parameters:
newValue
- is new value for the appliedParameters field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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.- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
getBboxCenter
in interfaceX3DBoundedObject
- Returns:
- value of bboxCenter field
-
setBboxCenter
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.- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
setBboxCenter
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the bboxCenter field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBboxDisplay
boolean getBboxDisplay()Provide boolean value from inputOutput SFBool field named bboxDisplay.
Tooltip: Whether to display bounding box for associated geometry, aligned with world coordinates.- Hint: the bounding box is displayed regardless of whether contained content is visible.
- Specified by:
getBboxDisplay
in interfaceX3DBoundedObject
- Returns:
- value of bboxDisplay field
-
setBboxDisplay
Accessor method to assign boolean value to inputOutput SFBool field named bboxDisplay.
Tooltip: Whether to display bounding box for associated geometry, aligned with world coordinates.- Hint: the bounding box is displayed regardless of whether contained content is visible.
- Specified by:
setBboxDisplay
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the bboxDisplay field.- Returns:
CollisionCollection
- 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: or [0,+infinity) 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.- Hint: can be useful for collision computations or inverse-kinematics (IK) engines.
- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
getBboxSize
in interfaceX3DBoundedObject
- Returns:
- value of bboxSize field
-
setBboxSize
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.
Tooltip: or [0,+infinity) 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.- Hint: can be useful for collision computations or inverse-kinematics (IK) engines.
- Hint: precomputation and inclusion of bounding box information can speed up the initialization of large detailed models, with a corresponding cost of increased file size.
- Hint: X3D Architecture, 10.2.2 Bounding boxes https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#BoundingBoxes
- Hint: X3D Architecture, 10.3.1 X3DBoundedObject https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/grouping.html#X3DBoundedObject
- Specified by:
setBboxSize
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the bboxSize field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getBounce
float getBounce()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named bounce.
Tooltip: [0,1] bounce indicates bounciness (0 = no bounce at all, 1 = maximum bounce). *- Returns:
- value of bounce field
-
setBounce
Accessor method to assign float value to inputOutput SFFloat field named bounce.
Tooltip: [0,1] bounce indicates bounciness (0 = no bounce at all, 1 = maximum bounce). *- Parameters:
newValue
- is new value for the bounce field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getCollidables
X3DNode[] getCollidables()Provide array of org.web3d.x3d.sai.Core.X3DNode results (using an array consisting of properly typed nodes or ProtoInstances) with acceptable node types limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode, from inputOutput MFNode field collidables.
Tooltip: [CollisionSpace|CollidableShape|CollidableOffset] CollisionCollection node holds a collection of objects in the collidables field that can be managed as a single entity for resolution of inter-object collisions with other groups of collidable objects. A group consists of both collidable objects as well as spaces that may be collided against each other. *
Warning: according to X3D Unified Object Model (X3DUOM), acceptable node types are limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode.- Returns:
- value of collidables field
- See Also:
-
setCollidables
Accessor method to assign org.web3d.x3d.sai.Core.X3DNode array (using an array consisting of properly typed nodes or ProtoInstances) to inputOutput MFNode field collidables.
Tooltip: [CollisionSpace|CollidableShape|CollidableOffset] CollisionCollection node holds a collection of objects in the collidables field that can be managed as a single entity for resolution of inter-object collisions with other groups of collidable objects. A group consists of both collidable objects as well as spaces that may be collided against each other. *
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:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
addCollidables
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
Set single child collidables node, replacing prior array of existing nodes (if any).- Parameters:
newValue
- is new node for the collidables field
-
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).
- Returns:
- value of description field
-
setDescription
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).
- Parameters:
newValue
- is new value for the description field.- Returns:
CollisionCollection
- 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. *- Returns:
- value of enabled field
-
setEnabled
Accessor method to assign boolean value to inputOutput SFBool field named enabled.
Tooltip: Enables/disables node operation. *- Parameters:
newValue
- is new value for the enabled field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getFrictionCoefficients
float[] getFrictionCoefficients()Provide array of 2-tuple float results within allowed range of [0,infinity) from inputOutput SFVec2f field named frictionCoefficients.
Tooltip: frictionCoefficients used for computing surface drag. *- Returns:
- value of frictionCoefficients field
-
setFrictionCoefficients
Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named frictionCoefficients.
Tooltip: frictionCoefficients used for computing surface drag. *- Parameters:
newValue
- is new value for the frictionCoefficients field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
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.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
getMetadata
in interfaceX3DChildNode
- Specified by:
getMetadata
in interfaceX3DNode
- Returns:
- value of metadata field
- See Also:
-
setMetadata
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.- Hint: X3D Architecture 7.2.4 Metadata https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS /Part01/components/core.html#Metadata
- Specified by:
setMetadata
in interfaceX3DChildNode
- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
newValue
- is new value for the metadata field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).- See Also:
-
getMinBounceSpeed
float getMinBounceSpeed()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minBounceSpeed.
Tooltip: [0,+infinity) minBounceSpeed m/s needed to bounce. *- Returns:
- value of minBounceSpeed field
-
setMinBounceSpeed
Accessor method to assign float value to inputOutput SFFloat field named minBounceSpeed.
Tooltip: [0,+infinity) minBounceSpeed m/s needed to bounce. *- Parameters:
newValue
- is new value for the minBounceSpeed field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSlipFactors
float[] getSlipFactors()Provide array of 2-tuple float results from inputOutput SFVec2f field named slipFactors.
Tooltip: slipFactors used for computing surface drag. *- Returns:
- value of slipFactors field
-
setSlipFactors
Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named slipFactors.
Tooltip: slipFactors used for computing surface drag. *- Parameters:
newValue
- is new value for the slipFactors field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSoftnessConstantForceMix
float getSoftnessConstantForceMix()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessConstantForceMix.
Tooltip: [0,1] softnessConstantForceMix value applies a constant force value to make colliding surfaces appear to be somewhat soft. *- Returns:
- value of softnessConstantForceMix field
-
setSoftnessConstantForceMix
Accessor method to assign float value to inputOutput SFFloat field named softnessConstantForceMix.
Tooltip: [0,1] softnessConstantForceMix value applies a constant force value to make colliding surfaces appear to be somewhat soft. *- Parameters:
newValue
- is new value for the softnessConstantForceMix field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSoftnessErrorCorrection
float getSoftnessErrorCorrection()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessErrorCorrection.
Tooltip: [0,1] softnessErrorCorrection indicates fraction of collision error fixed in a set of evaluations (0 = no error correction, 1 = all errors corrected in single step). *- Returns:
- value of softnessErrorCorrection field
-
setSoftnessErrorCorrection
Accessor method to assign float value to inputOutput SFFloat field named softnessErrorCorrection.
Tooltip: [0,1] softnessErrorCorrection indicates fraction of collision error fixed in a set of evaluations (0 = no error correction, 1 = all errors corrected in single step). *- Parameters:
newValue
- is new value for the softnessErrorCorrection field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getSurfaceSpeed
float[] getSurfaceSpeed()Provide array of 2-tuple float results from inputOutput SFVec2f field named surfaceSpeed.
Tooltip: surfaceSpeed defines speed vectors for computing surface drag, if contact surfaces move independently of bodies. *- Returns:
- value of surfaceSpeed field
-
setSurfaceSpeed
Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named surfaceSpeed.
Tooltip: surfaceSpeed defines speed vectors for computing surface drag, if contact surfaces move independently of bodies. *- Parameters:
newValue
- is new value for the surfaceSpeed field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-
getVisible
boolean getVisible()Provide boolean value from inputOutput SFBool field named visible.
Tooltip: Whether or not renderable content within this node is visually displayed.- Hint: the visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
- Hint: content must be visible to be collidable and to be pickable.
- Specified by:
getVisible
in interfaceX3DBoundedObject
- Returns:
- value of visible field
-
setVisible
Accessor method to assign boolean value to inputOutput SFBool field named visible.
Tooltip: Whether or not renderable content within this node is visually displayed.- Hint: the visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
- Hint: content must be visible to be collidable and to be pickable.
- Specified by:
setVisible
in interfaceX3DBoundedObject
- Parameters:
newValue
- is new value for the visible field.- Returns:
CollisionCollection
- namely this same object to allow sequential method pipelining (i.e. consecutive method invocations on the same object).
-