public class Point2PointJoint extends PhysicsJoint
From the Bullet manual:
Point to point constraint limits the translation so that the local pivot
points of 2 rigidbodies match in worldspace. A chain of rigidbodies can be
connected using this constraint.
collisionBetweenLinkedBodys, nodeA, nodeB, objectId, pivotA, pivotB
Modifier | Constructor and Description |
---|---|
protected |
Point2PointJoint()
No-argument constructor needed by SavableClassUtil.
|
|
Point2PointJoint(PhysicsRigidBody nodeA,
PhysicsRigidBody nodeB,
Vector3f pivotA,
Vector3f pivotB)
Instantiate a Point2PointJoint.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createJoint()
Create the configured joint in Bullet.
|
float |
getDamping()
Read the joint's damping ratio.
|
float |
getImpulseClamp()
Read the joint's impulse clamp.
|
float |
getTau()
Read the joint's tau value.
|
void |
read(JmeImporter im)
De-serialize this joint, for example when loading from a J3O file.
|
void |
setDamping(float value)
Alter the joint's damping.
|
void |
setImpulseClamp(float value)
Alter the joint's impulse clamp.
|
void |
setTau(float value)
Alter the joint's tau value.
|
void |
write(JmeExporter ex)
Serialize this joint, for example when saving to a J3O file.
|
destroy, finalize, getAppliedImpulse, getBodyA, getBodyB, getObjectId, getPivotA, getPivotB, isCollisionBetweenLinkedBodys, setCollisionBetweenLinkedBodys
protected Point2PointJoint()
public Point2PointJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB)
nodeA
- the 1st body connected by the joint (not null, alias
created)nodeB
- the 2nd body connected by the joint (not null, alias
created)pivotA
- the local offset of the connection point in node A (not
null, alias created)pivotB
- the local offset of the connection point in node B (not
null, alias created)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 float getDamping()
public float getImpulseClamp()
public float getTau()
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class PhysicsJoint
ex
- exporter (not null)java.io.IOException
- from exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class PhysicsJoint
im
- importer (not null)java.io.IOException
- from importerprotected void createJoint()