public class Point2PointJoint extends Constraint
From the Bullet manual:
Point to point constraint limits the translation so that the local pivot
points of 2 rigid bodies match in worldspace. A chain of rigid bodies can be
connected using this constraint.
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger2
message logger for this class
|
logger15, pivotA, pivotBloggerloggerN| Constructor and Description |
|---|
Point2PointJoint(PhysicsRigidBody rigidBodyA,
PhysicsRigidBody rigidBodyB,
Vector3f pivotInA,
Vector3f pivotInB)
Instantiate a double-ended Point2PointJoint.
|
Point2PointJoint(PhysicsRigidBody rigidBodyA,
Vector3f pivotInA)
Instantiate a single-ended Point2PointJoint where the constraint is
already satisfied.
|
Point2PointJoint(PhysicsRigidBody rigidBodyA,
Vector3f pivotInA,
Vector3f pivotInWorld)
Instantiate a single-ended Point2PointJoint where the constraint might
not be satisfied yet.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getDamping()
Read the joint's damping ratio.
|
float |
getImpulseClamp()
Read the joint's impulse clamp.
|
Vector3f |
getPivotInA(Vector3f storeResult)
Locate the pivot in A's scaled local coordinates.
|
Vector3f |
getPivotInB(Vector3f storeResult)
Locate the pivot in B's scaled local coordinates.
|
float |
getTau()
Read the joint's tau value.
|
void |
setDamping(float value)
Alter the joint's damping.
|
void |
setImpulseClamp(float value)
Alter the joint's impulse clamp.
|
void |
setPivotInA(Vector3f location)
Alter the pivot location in A's scaled local coordinates.
|
void |
setPivotInB(Vector3f location)
Alter the pivot location in B's scaled local coordinates.
|
void |
setTau(float value)
Alter the joint's tau value.
|
getAppliedImpulse, getBodyA, getBodyB, getBreakingImpulseThreshold, getConstraintType, getOverrideIterations, getPivot, getPivotA, getPivotB, isCollisionBetweenLinkedBodies, isEnabled, isFeedback, overrideIterations, setBreakingImpulseThreshold, setCollisionBetweenLinkedBodies, setEnabled, setFeedbackcountEnds, 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 Point2PointJoint(PhysicsRigidBody rigidBodyA, Vector3f pivotInA)
To be effective, the joint must be added to the body's PhysicsSpace and the body must be dynamic.
rigidBodyA - the body to constrain (not null, alias created)pivotInA - the pivot location in the body's scaled local coordinates
(not null, unaffected)public Point2PointJoint(PhysicsRigidBody rigidBodyA, Vector3f pivotInA, Vector3f pivotInWorld)
To be effective, the joint must be added to the body's PhysicsSpace and the body must be dynamic.
rigidBodyA - the body to constrain (not null, alias created)pivotInA - the pivot location in A's scaled local coordinates (not
null, unaffected)pivotInWorld - the pivot location in physics-space coordinates (not
null, unaffected)public Point2PointJoint(PhysicsRigidBody rigidBodyA, PhysicsRigidBody rigidBodyB, Vector3f pivotInA, Vector3f pivotInB)
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)pivotInA - the pivot location in A's scaled local coordinates (not
null, unaffected)pivotInB - the pivot location in B's scaled local coordinates (not
null, unaffected)public float getDamping()
public float getImpulseClamp()
public Vector3f getPivotInA(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public Vector3f getPivotInB(Vector3f storeResult)
storeResult - storage for the result (modified if not null)public float getTau()
public void setDamping(float value)
value - the desired viscous damping ratio (0→no damping,
1→critically damped, default=1)public void setImpulseClamp(float value)
value - the desired impulse clamp value (default=0)public void setTau(float value)
value - the desired tau value (default=0.3)public void setPivotInA(Vector3f location)
setPivotInA in class Constraintlocation - the desired location (not null, unaffected)public void setPivotInB(Vector3f location)
setPivotInB in class Constraintlocation - the desired location (not null, unaffected)