Contact

From Web3D.org
Revision as of 13:51, 13 April 2015 by Walroy (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contact

Specification Link: Contact

Contact : X3DNode {
  MFString [in,out] appliedParameters        "BOUNCE"
  SFNode   [in,out] body1                    NULL     [RigidBody]
  SFNode   [in,out] body2                    NULL     [RigidBody]
  SFFloat  [in,out] bounce                   0        [0,1]
  SFVec3f  [in,out] contactNormal            0 1 0    (-∞,∞)
  SFFloat  [in,out] depth                    0        (-∞,∞)
  SFVec2f  [in,out] frictionCoefficients     0 0      [0,∞)
  SFVec3f  [in,out] frictionDirection        0 1 0    (-∞,∞)
  SFNode   [in,out] geometry1                NULL     [X3DNBodyCollidableNode]
  SFNode   [in,out] geometry2                NULL     [X3DNBodyCollidableNode]
  SFNode   [in,out] metadata                 NULL     [X3DMetadataObject]
  SFFloat  [in,out] minbounceSpeed           0        [0,∞)
  SFVec3f  [in,out] position                 0 0 0    (-∞,∞)
  SFVec2f  [in,out] slipCoefficients         0 0      (-∞,∞)
  SFFloat  [in,out] softnessConstantForceMix 0.0001   [0,1]
  SFFloat  [in,out] softnessErrorCorrection  0.8      [0,1]
  SFVec2f  [in,out] surfaceSpeed             0 0      (-∞,∞)
}

Note: Although validation is provided this node cannot be included directly within an X3D file. It will only be created programmatically by the browser. It can only appear in the outputOnly contacts field of the CollisionSensor node and the inputOnly set_contacts field of the RigidBodyCollection node.

DTD Validation

Children

Children must appear as follows:

  1. A single, optional IS.
  2. A single, optional node derived from X3DMetadataObject for the metadata field.
  3. Any number, including none, of RigidBody, CollidableOffset, CollidableShape or Prototype nodes in any order.

Note that the DTD does not limit the number of children (excluding IS and metadata) to a maximum of four, i.e. body1, body2, geometry1 and geometry2.

Attributes

  • There are no controls on the acceptable entries for the appliedParameters field.
  • There are no limits on the values for the bounce, frictionCoefficients, minBounceSpeed, softnessConstantForceMix, or softnessErrorCorrection fields.
  • The Contact node has a default containerField value of "children".

Schema Validation

TBD

Schematron validation

TBD