Interface CollisionCollection
- All Superinterfaces:
X3DBoundedObject,X3DChildNode,X3DNode
- All Known Implementing Classes:
CollisionCollectionObject
public interface CollisionCollection extends X3DChildNode, X3DBoundedObject
CollisionCollection holds a collection of objects that can be managed as a single entity for resolution of inter-object collisions.
X3D node tooltip: (X3D version 3.2 or later) [X3DChildNode] CollisionCollection holds a collection of objects that can be managed as a single entity for resolution of inter-object collisions.
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) [X3DChildNode] 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').
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 voidaddCollidables(X3DNode[] newValue)Add array of child collidables nodes to array of existing nodes (if any).java.lang.String[]getAppliedParameters()Provide array of String enumeration results (baseType appliedParametersChoices) ['"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[]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.floatgetBounce()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named bounce.X3DNode[]getCollidables()Provide array of X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) with acceptable node types limited to X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode, from inputOutput MFNode field collidables.booleangetDisplayBBox()Provide boolean value from inputOutput SFBool field named displayBBox.booleangetEnabled()Provide boolean value from inputOutput SFBool field named enabled.float[]getFrictionCoefficients()Provide array of 2-tuple float results within allowed range of [0,infinity) from inputOutput SFVec2f field named frictionCoefficients.X3DMetadataObjectgetMetadata()Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.floatgetMinBounceSpeed()Provide float value within allowed range of [0,infinity) from inputOutput SFFloat field named minBounceSpeed.float[]getSlipFactors()Provide array of 2-tuple float results from inputOutput SFVec2f field named slipFactors.floatgetSoftnessConstantForceMix()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessConstantForceMix.floatgetSoftnessErrorCorrection()Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessErrorCorrection.float[]getSurfaceSpeed()Provide array of 2-tuple float results from inputOutput SFVec2f field named surfaceSpeed.booleangetVisible()Provide boolean value from inputOutput SFBool field named visible.CollisionCollectionsetAppliedParameters(java.lang.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.CollisionCollectionsetBboxCenter(float[] newValue)Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.CollisionCollectionsetBboxSize(float[] newValue)Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.CollisionCollectionsetBounce(float newValue)Accessor method to assign float value to inputOutput SFFloat field named bounce.voidsetCollidables(X3DNode newValue)Set single child collidables node, replacing prior array of existing nodes (if any).CollisionCollectionsetCollidables(X3DNode[] newValue)Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field collidables. // newValueInstanceAcceptableNodeTypesTest checks are needed for methods that override/subset X3DNode interfaces #1 boolean isNodeTypeAllowed = (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollisionSpaceNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollidableNode); if (!CollisionCollectionsetDisplayBBox(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named displayBBox.CollisionCollectionsetEnabled(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named enabled.CollisionCollectionsetFrictionCoefficients(float[] newValue)Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named frictionCoefficients.CollisionCollectionsetMetadata(X3DMetadataObject newValue)Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.CollisionCollectionsetMinBounceSpeed(float newValue)Accessor method to assign float value to inputOutput SFFloat field named minBounceSpeed.CollisionCollectionsetSlipFactors(float[] newValue)Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named slipFactors.CollisionCollectionsetSoftnessConstantForceMix(float newValue)Accessor method to assign float value to inputOutput SFFloat field named softnessConstantForceMix.CollisionCollectionsetSoftnessErrorCorrection(float newValue)Accessor method to assign float value to inputOutput SFFloat field named softnessErrorCorrection.CollisionCollectionsetSurfaceSpeed(float[] newValue)Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named surfaceSpeed.CollisionCollectionsetVisible(boolean newValue)Accessor method to assign boolean value to inputOutput SFBool field named visible.
-
Method Details
-
getAppliedParameters
java.lang.String[] getAppliedParameters()Provide array of String enumeration results (baseType appliedParametersChoices) ['"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.- Specified by:
getBboxCenterin interfaceX3DBoundedObject- Returns:
- value of bboxCenter field
-
setBboxCenter
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxCenter.- Specified by:
setBboxCenterin 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).
-
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.- Specified by:
getBboxSizein interfaceX3DBoundedObject- Returns:
- value of bboxSize field
-
setBboxSize
Accessor method to assign 3-tuple float array to initializeOnly SFVec3f field named bboxSize.- Specified by:
setBboxSizein 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 X3DNode results (using an array consisting of properly typed nodes or ProtoInstanceObjects) 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:
X3DNBodyCollisionSpaceNode,X3DNBodyCollidableNode
-
setCollidables
Accessor method to assign X3DNode array (using an array consisting of properly typed nodes or ProtoInstanceObjects) to inputOutput MFNode field collidables. // newValueInstanceAcceptableNodeTypesTest checks are needed for methods that override/subset X3DNode interfaces #1 boolean isNodeTypeAllowed = (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollisionSpaceNode) || (((X3DConcreteNode)newValue) instanceof org.web3d.x3d.sai.RigidBodyPhysics.X3DNBodyCollidableNode); if (!isNodeTypeAllowed) { throw new org.web3d.x3d.sai.InvalidFieldValueException("X3DNode newValue is not instanceof " + "acceptableNodeTypes X3DNBodyCollisionSpaceNode|X3DNBodyCollidableNode; newValue=" + newValue); }
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
-
getDisplayBBox
boolean getDisplayBBox()Provide boolean value from inputOutput SFBool field named displayBBox.- Specified by:
getDisplayBBoxin interfaceX3DBoundedObject- Returns:
- value of displayBBox field
-
setDisplayBBox
Accessor method to assign boolean value to inputOutput SFBool field named displayBBox.- Specified by:
setDisplayBBoxin interfaceX3DBoundedObject- Parameters:
newValue- is new value for the displayBBox 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 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- 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- 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:
- X3D Scene Authoring Hints: Metadata Nodes
-
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.- Specified by:
getVisiblein interfaceX3DBoundedObject- Returns:
- value of visible field
-
setVisible
Accessor method to assign boolean value to inputOutput SFBool field named visible.- Specified by:
setVisiblein 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).
-