public class ConeJoint extends PhysicsJoint
From the Bullet manual:
To create ragdolls, the cone twist constraint is very useful for limbs like
the upper arm. It is a special point to point constraint that adds cone and
twist axis limits. The x-axis serves as twist axis.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
angularOnly |
protected Matrix3f |
rotA |
protected Matrix3f |
rotB |
protected float |
swingSpan1 |
protected float |
swingSpan2 |
protected float |
twistSpan |
collisionBetweenLinkedBodys, nodeA, nodeB, objectId, pivotA, pivotB| Modifier | Constructor and Description |
|---|---|
protected |
ConeJoint()
No-argument constructor needed by SavableClassUtil.
|
|
ConeJoint(PhysicsRigidBody nodeA,
PhysicsRigidBody nodeB,
Vector3f pivotA,
Vector3f pivotB)
Instantiate a ConeJoint.
|
|
ConeJoint(PhysicsRigidBody nodeA,
PhysicsRigidBody nodeB,
Vector3f pivotA,
Vector3f pivotB,
Matrix3f rotA,
Matrix3f rotB)
Instantiate a ConeJoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createJoint()
Create the configured joint in Bullet.
|
void |
read(JmeImporter im)
De-serialize this joint, for example when loading from a J3O file.
|
void |
setAngularOnly(boolean value)
Alter whether this joint is angular only.
|
void |
setLimit(float swingSpan1,
float swingSpan2,
float twistSpan)
Alter the angular limits for this joint.
|
void |
write(JmeExporter ex)
Serialize this joint, for example when saving to a J3O file.
|
destroy, finalize, getAppliedImpulse, getBodyA, getBodyB, getObjectId, getPivotA, getPivotB, isCollisionBetweenLinkedBodys, setCollisionBetweenLinkedBodysprotected Matrix3f rotA
protected Matrix3f rotB
protected float swingSpan1
protected float swingSpan2
protected float twistSpan
protected boolean angularOnly
protected ConeJoint()
public ConeJoint(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 ConeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Matrix3f rotA, Matrix3f rotB)
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 - local translation of the joint connection point in node A
(not null, alias created)pivotB - local translation of the joint connection point in node B
(not null, alias created)rotA - the local orientation of the connection to node A (not null,
alias created)rotB - the local orientation of the connection to node B (not null,
alias created)public void setLimit(float swingSpan1,
float swingSpan2,
float twistSpan)
swingSpan1 - angle (in radians)swingSpan2 - angle (in radians)twistSpan - angle (in radians)public void setAngularOnly(boolean value)
value - the desired setting (default=false)public void write(JmeExporter ex) throws java.io.IOException
write in interface Savablewrite in class PhysicsJointex - exporter (not null)java.io.IOException - from exporterpublic void read(JmeImporter im) throws java.io.IOException
read in interface Savableread in class PhysicsJointim - importer (not null)java.io.IOException - from importerprotected void createJoint()