Class: RigidBody

X3D: 3.3
Component: RigidBodyPhysics
Status:
experimental

.nodeTypes. RigidBody

The RigidBody node describes a body and its properties that can be affected by the physics model. A body is modelled as a collection of shapes that describe mass distribution rather than renderable geometry. Bodies are connected together using Joints and are represented by geometry.

HTML Encoding and Default Values

<RigidBody angularDampingFactor='0.001' angularVelocity='0,0,0' autoDamp='false' autoDisable='false' centerOfMass='0,0,0' disableAngularSpeed='0' disableLinearSpeed='0' disableTime='0' enabled='true' finiteRotationAxis='0,0,0' fixed='false' forces='[]' geometry='x3dom.nodeTypes.X3DNBodyCollidableNode' inertia='[1,0,0,0,1,0,0,0,1]' linearDampingFactor='0.001' linearVelocity='0,0,0' mass='1' massDensityModel='x3dom.nodeTypes.Shape' metadata='X3DMetadataObject' orientation='0,0,1,0' position='0,0,0' torques='[]' useFiniteRotation='false' useGlobalGravity='true' ></RigidBody>

Inheritance


Constructor

RigidBody(ctx)

Constructor for RigidBody

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
angularDampingFactor SFFloat 0.001 [0,1] Angular damping factor.
angularVelocity SFVec3f 0,0,0 The velocity fields are used to provide a constant velocity value to the object every frame. If both forces and velocity are defined, the velocity is used only on the first frame that the node is active, and then the forces are applied.
autoDamp SFBool false The application of damping is controlled through the use of the autoDamp field. When the value is FALSE, no damping is applied. When the value is TRUE, rotational and translational damping is calculated and applied.
autoDisable SFBool false By default, this automatic disabling is turned off. It may be enabled by setting the autoDisable field to TRUE.
centerOfMass SFVec3f 0,0,0 (-inf, inf) Center of mass for calculations
disableAngularSpeed SFFloat 0 [0,inf) The disable fields define conditions for when the body ceases to considered as part of the rigid body calculations and should be considered as at rest.
disableLinearSpeed SFFloat 0 [0,inf) The disable fields define conditions for when the body ceases to considered as part of the rigid body calculations and should be considered as at rest.
disableTime SFFloat 0 [0,inf) The disable fields define conditions for when the body ceases to considered as part of the rigid body calculations and should be considered as at rest.
enabled SFBool true The enabled field controls whether the information in this node is submitted to the physics engine for processing. If the enabled field is set TRUE, the node is submitted to the physics engine. If the enabled field is set FALSE, the node is not submitted to the physics engine for processing.
finiteRotationAxis SFVec3f 0,0,0 The finiteRotationAxis field specifies a vector around which the object rotates.
fixed SFBool false The fixed field is used to indicate that this body does not move. Any calculations involving collisions with this body should take into account that this body does not move. This is useful for representing objects such as the ground, walls etc that can be collided with, have an effect on other objects, but are not capable of moving themselves.
forces MFVec3f [] The torques and forces fields define zero or more sets of torque and force values that are applied to the object every frame. These are continuously applied until reset to zero by the user.
geometry MFNode X3DNBodyCollidableNode The geometry field is used to connect the body modelled by the physics engine implementation to the real geometry of the scene through the use of collidable nodes. This allows the geometry to be connected directly to the physics model as well as collision detection. Collidable nodes have their location set to the same location as the body instance in which they are located. Their position and location are not relative to this object, unless otherwise defined.
inertia MFFloat [1,0,0,0,1,0,0,0,1] The inertia field represents a 3x2 inertia tensor matrix. If the set values are less than six items, the results are implementation dependent. If the value set is greater than six values, only the first six values of the array are used.
linearDampingFactor SFFloat 0.001 [0,1] Linear damping factor.
linearVelocity SFVec3f 0,0,0 (-inf, inf) Linear velocity.
mass SFFloat 1 [0,inf) The mass field indicates the mass of the body in mass base units. All bodies shall have a non-zero mass, with the default value of 1 mass base unit.
massDensityModel MFNode Shape The massDensityModel field is used to describe the geometry type and dimensions used to calculate the mass density in the physics model. This geometry has no renderable property, other than for defining the model of the mass density. It is not rendered, nor modified by the physics model.
metadata SFNode X3DMetadataObject X3DNode Field to add metadata information
orientation SFRotation 0,0,1,0 [0,1] The position and orientation fields are used to set the initial conditions of this body's location in world space. After the initial conditions have been set, these fields are used to report the current information based on the most recent physics model evaluation.
position SFVec3f 0,0,0 (-inf, inf) The position and orientation fields are used to set the initial conditions of this body's location in world space. After the initial conditions have been set, these fields are used to report the current information based on the most recent physics model evaluation.
torques MFVec3f [] The torques and forces fields define zero or more sets of torque and force values that are applied to the object every frame. These are continuously applied until reset to zero by the user.
useFiniteRotation SFBool false The useFiniteRotation field is used to influence the way the body's rotation is calculated. In very fast rotating objects, such as a wheel of a car, an infinitely small time step can cause the modelling to explode. The default value is to use the faster infinite mode.
useGlobalGravity SFBool true The useGlobalGravity field is used to indicate whether this particular body should be influenced by the containing RigidBodyCollection's gravity setting. A value of TRUE indicates that the gravity is used, a value of FALSE indicates that it is not used. This only applies to this body instance. Contained sub-bodies shall not be affected by this setting.