Class: MotorJoint

X3D: 3.3
Component: RigidBodyPhysics
Status:
experimental

x3dom.nodeTypes. MotorJoint

The MotorJoint node allows control of the relative angular velocities between the two bodies (specified by the body1 and body2 fields) associated with a joint. This can be especially useful with a BallJoint where there is no restriction on the angular degrees of freedom.

HTML Encoding and Default Values

<MotorJoint axis1Angle='0' axis1Torque='0' axis2Angle='0' axis2Torque='0' axis3Angle='0' axis3Torque='0' body1='x3dom.nodeTypes.RigidBody' body2='x3dom.nodeTypes.RigidBody' enabledAxes='1' forceOutput='"NONE"' metadata='X3DMetadataObject' motor1Axis='0,0,0' motor2Axis='0,0,0' motor3Axis='0,0,0' stop1Bounce='0' stop1ErrorCorrection='0.8' stop2Bounce='0' stop2ErrorCorrection='0.8' stop3Bounce='0' stop3ErrorCorrection='0.8' ></MotorJoint>

Inheritance


Constructor

MotorJoint(ctx)

Constructor for MotorJoint

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
axis1Angle SFFloat 0 [-pi, pi] The three axis angle fields provide angles (in angle base units) for this frame for the corresponding motor axis when in user-calculated mode.
axis1Torque SFFloat 0 (-inf, inf) Torque on axis 1.
axis2Angle SFFloat 0 [-pi, pi] The three axis angle fields provide angles (in angle base units) for this frame for the corresponding motor axis when in user-calculated mode.
axis2Torque SFFloat 0 (-inf, inf) Torque on axis 2.
axis3Angle SFFloat 0 [-pi, pi] The three axis angle fields provide angles (in angle base units) for this frame for the corresponding motor axis when in user-calculated mode.
axis3Torque SFFloat 0 (-inf, inf) Torque on axis 3.
body1 SFNode RigidBody X3DRigidJointNode The first body to be joint by the node
body2 SFNode RigidBody X3DRigidJointNode The second rigid body to be joint by the node
enabledAxes SFInt32 1 [0,3] The currently enabled axis.
forceOutput SFString "NONE" ["ALL", "NONE",...] X3DRigidJointNode The forceOutput field is used to control which output fields are to be generated for the next frame. In physics models, the amount of data that can be generated per frame can be quite extensive, particularly in complex models with a large number of joints. A typical application will need only a few of them, if any at all. This field is used to control which of those outputs the author requires to be generated. The values of the array are to describe the names, exactly, of the output field(s) that are to be updated at the start of the next frame. Two special values are defined: "ALL" and "NONE".
metadata SFNode X3DMetadataObject X3DRigidJointNode Field to add metadata information
motor1Axis SFVec3f 0,0,0 The motorAxis fields define the axis vector of the corresponding axis.
motor2Axis SFVec3f 0,0,0 The motorAxis fields define the axis vector of the corresponding axis.
motor3Axis SFVec3f 0,0,0 The motorAxis fields define the axis vector of the corresponding axis.
stop1Bounce SFFloat 0 [0,1] The stop bounce fields describe how much the joint should bounce the body back on the corresponding axis if the joint limit has been reached or exceeded. A value of zero indicates no bounce at all, and a value of one says that it should bounce with velocity equal and opposite to the collision velocity of the contact.
stop1ErrorCorrection SFFloat 8 [0,1] The stop error correction fields describe the amount of error correction to be performed in a time step when the joint reaches the limit on the corresponding axis. A value of zero means no error correction is to be performed and a value of one means all error should be corrected in a single step.
stop2Bounce SFFloat 0 [0,1] The stop bounce fields describe how much the joint should bounce the body back on the corresponding axis if the joint limit has been reached or exceeded. A value of zero indicates no bounce at all, and a value of one says that it should bounce with velocity equal and opposite to the collision velocity of the contact.
stop2ErrorCorrection SFFloat 8 [0,1] The stop error correction fields describe the amount of error correction to be performed in a time step when the joint reaches the limit on the corresponding axis. A value of zero means no error correction is to be performed and a value of one means all error should be corrected in a single step.
stop3Bounce SFFloat 0 [0,1] The stop bounce fields describe how much the joint should bounce the body back on the corresponding axis if the joint limit has been reached or exceeded. A value of zero indicates no bounce at all, and a value of one says that it should bounce with velocity equal and opposite to the collision velocity of the contact.
stop3ErrorCorrection SFFloat 8 [0,1] The stop error correction fields describe the amount of error correction to be performed in a time step when the joint reaches the limit on the corresponding axis. A value of zero means no error correction is to be performed and a value of one means all error should be corrected in a single step.