Interface CollisionCollection

All Superinterfaces:
X3DNode
All Known Implementing Classes:
CollisionCollectionObject

public interface CollisionCollection
extends X3DNode
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.
  • 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).
See Also:
SAI Java Specification: TODO, X3D Abstract Specification: CollisionCollection, X3D Tooltips: CollisionCollection, X3D Scene Authoring Hints
  • Method Summary

    Modifier and Type Method Description
    void addCollidables​(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 getBounce()
    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.
    boolean getEnabled()
    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.
    X3DMetadataObject getMetadata()
    Provide X3DMetadataObject instance (using a properly typed node) from inputOutput SFNode field metadata.
    float getMinBounceSpeed()
    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.
    float getSoftnessConstantForceMix()
    Provide float value within allowed range of [0,1] from inputOutput SFFloat field named softnessConstantForceMix.
    float getSoftnessErrorCorrection()
    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.
    CollisionCollection setAppliedParameters​(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.
    CollisionCollection 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).
    CollisionCollection setCollidables​(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 (!
    CollisionCollection setEnabled​(boolean newValue)
    Accessor method to assign boolean value to inputOutput SFBool field named enabled.
    CollisionCollection setFrictionCoefficients​(float[] newValue)
    Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named frictionCoefficients.
    CollisionCollection setMetadata​(X3DMetadataObject newValue)
    Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
    CollisionCollection setMinBounceSpeed​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named minBounceSpeed.
    CollisionCollection setSlipFactors​(float[] newValue)
    Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named slipFactors.
    CollisionCollection setSoftnessConstantForceMix​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named softnessConstantForceMix.
    CollisionCollection setSoftnessErrorCorrection​(float newValue)
    Accessor method to assign float value to inputOutput SFFloat field named softnessErrorCorrection.
    CollisionCollection setSurfaceSpeed​(float[] newValue)
    Accessor method to assign 2-tuple float array to inputOutput SFVec2f field named surfaceSpeed.
  • 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

      CollisionCollection setAppliedParameters​(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.

      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).
    • 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

      CollisionCollection setBounce​(float newValue)
      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

      CollisionCollection setCollidables​(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 (!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

      void addCollidables​(X3DNode[] newValue)
      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

      void setCollidables​(X3DNode newValue)
      Set single child collidables node, replacing prior array of existing nodes (if any).
      Parameters:
      newValue - is new node for the collidables field
    • getEnabled

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

      Tooltip: Enables/disables node operation. *
      Returns:
      value of enabled field
    • setEnabled

      CollisionCollection setEnabled​(boolean newValue)
      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

      CollisionCollection setFrictionCoefficients​(float[] newValue)
      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.
      Specified by:
      getMetadata in interface X3DNode
      Returns:
      value of metadata field
      See Also:
      X3D Scene Authoring Hints: Metadata Nodes
    • setMetadata

      CollisionCollection setMetadata​(X3DMetadataObject newValue)
      Accessor method to assign X3DMetadataObject instance (using a properly typed node) to inputOutput SFNode field metadata.
      Specified by:
      setMetadata in interface X3DNode
      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

      CollisionCollection setMinBounceSpeed​(float newValue)
      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

      CollisionCollection setSlipFactors​(float[] newValue)
      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

      CollisionCollection setSoftnessConstantForceMix​(float newValue)
      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

      CollisionCollection setSoftnessErrorCorrection​(float newValue)
      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

      CollisionCollection setSurfaceSpeed​(float[] newValue)
      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).