public class GearJoint extends Constraint
From the Bullet manual:
The btGearConstraint will couple the angular velocity for two bodies around given local axis and ratio.
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
logger15, pivotA, pivotBloggerloggerN| Constructor and Description |
|---|
GearJoint(PhysicsRigidBody rigidBodyA,
PhysicsRigidBody rigidBodyB,
Vector3f axisInA,
Vector3f axisInB)
Instantiate a double-ended GearJoint with a 1:1 ratio.
|
GearJoint(PhysicsRigidBody rigidBodyA,
PhysicsRigidBody rigidBodyB,
Vector3f axisInA,
Vector3f axisInB,
float ratio)
Instantiate a double-ended GearJoint with the specified gear ratio.
|
| Modifier and Type | Method and Description |
|---|---|
Vector3f |
getAxisA(Vector3f storeResult)
Copy A body's axis of rotation.
|
Vector3f |
getAxisB(Vector3f storeResult)
Copy the B body's axis of rotation.
|
float |
getRatio()
Get the gear ratio.
|
void |
setAxisA(Vector3f axisInA)
Alter the A body's axis of rotation.
|
void |
setAxisB(Vector3f axisInB)
Alter the B body's axis of rotation.
|
void |
setRatio(float ratio)
Alter the joint's gear ratio.
|
getAppliedImpulse, getBodyA, getBodyB, getBreakingImpulseThreshold, getConstraintType, getOverrideIterations, getPivot, getPivotA, getPivotB, isCollisionBetweenLinkedBodies, isEnabled, isFeedback, overrideIterations, setBreakingImpulseThreshold, setCollisionBetweenLinkedBodies, setEnabled, setFeedback, setPivotInA, setPivotInBcountEnds, destroy, findEnd, findOtherBody, getBody, getPhysicsSpace, setBodyA, setBodyB, setNativeId, setPhysicsSpace, toStringcompareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeIdNotTracked, unassignNativeObjectpublic static final java.util.logging.Logger logger2
public GearJoint(PhysicsRigidBody rigidBodyA, PhysicsRigidBody rigidBodyB, Vector3f axisInA, Vector3f axisInB)
To be effective, the joint must be added to the PhysicsSpace of both bodies. Also, the bodies must be distinct and at least one of them must be dynamic.
rigidBodyA - the body for the A end (not null, alias created)rigidBodyB - the body for the B end (not null, alias created)axisInA - the A body's axis of rotation in its local coordinates
(unit vector, not null, unaffected)axisInB - the B body's axis of rotation in its local coordinates
(unit vector, not null, unaffected)public GearJoint(PhysicsRigidBody rigidBodyA, PhysicsRigidBody rigidBodyB, Vector3f axisInA, Vector3f axisInB, float ratio)
To be effective, the joint must be added to the PhysicsSpace of both bodies. Also, the bodies must be distinct and at least one of them must be dynamic.
rigidBodyA - the body for the A end (not null, alias created)rigidBodyB - the body for the B end (not null, alias created)axisInA - the A body's axis of rotation in its local coordinates
(unit vector, not null, unaffected)axisInB - the B body's axis of rotation in its local coordinates
(unit vector, not null, unaffected)ratio - the number of revolutions the A body should make for each
revolution of the B bodypublic Vector3f getAxisA(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public Vector3f getAxisB(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public float getRatio()
public void setAxisA(Vector3f axisInA)
axisInA - the desired axis in local coordinates (unit vector, not
null, unaffected)public void setAxisB(Vector3f axisInB)
axisInB - the axisInB axis in local coordinates (unit vector, not
null, unaffected)public void setRatio(float ratio)
ratio - the number of revolutions the A body should make for each
revolution of the B body (default=1)