Class: SingleAxisHingeJoint

X3D: 3.3
Component: RigidBodyPhysics
Status:
experimental

.nodeTypes. SingleAxisHingeJoint

This node represents a joint with a single axis about which to rotate. As the name suggests, this is a joint that works like a traditional door hinge. The axis of the hinge is defined to be along the unit vector described in the axis field and centered on the anchorPoint described in world coordinates. The objects on each side of the hinge are specified by the body1 and body2 fields.

HTML Encoding and Default Values

<SingleAxisHingeJoint anchorPoint='0,0,0' axis='0,0,0' body1='x3dom.nodeTypes.RigidBody' body2='x3dom.nodeTypes.RigidBody' forceOutput='"NONE"' maxAngle='90' metadata='X3DMetadataObject' minAngle='-90' stopBounce='0' stopErrorCorrection='0.8' ></SingleAxisHingeJoint>

Inheritance


Constructor

SingleAxisHingeJoint(ctx)

Constructor for SingleAxisHingeJoint

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
anchorPoint SFVec3f 0,0,0 The axis of the hinge is defined to be along the unit vector described in the axis field and centered on the anchorPoint described in world coordinates.
axis SFVec3f 0,0,0 The axis of the hinge is defined to be along the unit vector described in the axis field and centered on the anchorPoint described in world coordinates.
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
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".
maxAngle SFFloat 90 [-PI*degToRad, PI*degToRad] The minAngle and maxAngle fields are used to control the maximum angles through which the hinge is allowed to travel. A hinge may not travel more than π radians (or the equivalent angle base units) in either direction from its initial position.
metadata SFNode X3DMetadataObject X3DNode Field to add metadata information
minAngle SFFloat -90 [-PI*degToRad, PI*degToRad] The minAngle and maxAngle fields are used to control the maximum angles through which the hinge is allowed to travel. A hinge may not travel more than π radians (or the equivalent angle base units) in either direction from its initial position.
stopBounce SFFloat 0 [0,1] The stopBounce field describes how much the joint should bounce the body back 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.
stopErrorCorrection SFFloat 0.8 [0,1] The stopErrorCorrection field describes the amount of error correction to be performed in a time step when the joint reaches the limit. 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.