Post

RigidBodyCollection

RigidBodyCollection

Overview

RigidBodyCollection represents a system of bodies that interact within a single physics model.

The RigidBodyCollection node belongs to the RigidBodyPhysics component and requires at least level 2, its default container field is children. It is available from X3D version 3.2 or higher.

Hierarchy

1
2
3
+ X3DNode
  + X3DChildNode
    + RigidBodyCollection

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

Hint

SFBool [in, out] enabled TRUE

Enables/disables node operation.

MFNode [in] set_contacts not supported

set_contacts input field for Contact nodes provides per-frame information about contacts between bodies.

Warning

  • It is an error to define this transient inputOnly field in an X3D file, instead only use it a destination for ROUTE events.

SFVec3f [in, out] gravity 0 -9.8 0 (-∞,∞)

gravity indicates direction and strength of local gravity vector for this collection of bodies (units m/sec^2).

SFBool [in, out] preferAccuracy FALSE

preferAccuracy provides hint for performance preference: higher accuracy or faster computational speed.

SFFloat [in, out] errorCorrection 0.8 [0,1] not supported

errorCorrection describes how quickly intersection errors due to floating-point inaccuracies are resolved (0=no correction, 1=all corrected in single step).

SFInt32 [in, out] iterations 10 [0,∞)

iterations controls number of iterations performed over collectioned joints and bodies during each evaluation.

SFFloat [in, out] constantForceMix 0.0001 [0,∞) not supported

constantForceMix modifies damping calculations by violating normal constraints while applying small, constant forces in those calculations.

Hints

  • This allows joints and bodies to be a fraction springy, and helps to eliminate numerical instability.
  • Spring-driven or spongy connections can be emulated by combined use of errorCorrection and constantForceMix.

SFFloat [in, out] maxCorrectionSpeed -1 [0,∞) or -1 not supported

Or -1, maxCorrectionSpeed .

SFFloat [in, out] contactSurfaceThickness 0 [0,∞)

contactSurfaceThickness defines how far bodies may interpenetrate after a collision, allowing simulation of softer bodies that deform somewhat during collision.

SFBool [in, out] autoDisable FALSE

autoDisable toggles operation of disableAngularSpeed, disableLinearSpeed, disableTime.

SFTime [in, out] disableTime 0 [0,∞) not supported

disableTime defines interval when body becomes at rest and not part of rigid body calculations, reducing numeric instabilities.

Hints

  • Only activated if autoDisable=’true’
  • disableTime is an SFTime duration interval, not an absolute clock time.

SFFloat [in, out] disableLinearSpeed 0 [0,∞)

disableLinearSpeed defines lower-limit tolerance value when body is considered at rest and not part of rigid body calculation, reducing numeric instabilitiess.

Hint

  • Only activated if autoDisable=’true’

SFFloat [in, out] disableAngularSpeed 0 [0,∞)

disableAngularSpeed defines lower-limit tolerance value when body is considered at rest and not part of rigid body calculations, reducing numeric instabilities.

Hint

  • Only activated if autoDisable=’true’

SFNode [ ] collider NULL [CollisionCollection]

The collider field associates a collision collection with this rigid body collection allowing seamless updates and integration without the need to use the X3D event model.

MFNode [in, out] bodies [ ] [RigidBody]

Collection of top-level nodes that comprise a set of bodies evaluated as a single set of interactions.

MFNode [in, out] joints [ ] [X3DRigidJointNode]

The joints field is used to register all joints between bodies contained in this collection.

Warnings

  • If a joint is connected between bodies in two different collections, the result is implementation-dependent.
  • If a joint instance is registered with more than one collection, the results are implementation dependent.
  • Joints not registered with any collection are not evaluated.

SFBool [in, out] visible TRUE

Whether or not renderable content within this node is visually displayed.

Hints

  • The visible field has no effect on animation behaviors, event passing or other non-visual characteristics.
  • Content must be visible to be collidable and to be pickable.

SFBool [in, out] bboxDisplay FALSE

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.

SFVec3f [ ] bboxSize -1 -1 -1 [0,∞) or −1 −1 −1

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.

Hints

SFVec3f [ ] bboxCenter 0 0 0 (-∞,∞)

Bounding box center accompanies bboxSize and provides an optional hint for bounding box position offset from origin of local coordinate system.

Hints

Example

See Also

This post is licensed under CC BY 4.0 by the author.