public abstract class PhysicsJoint extends java.lang.Object implements Savable
PhysicsJoint - Basic Physics Joint
Modifier and Type | Field and Description |
---|---|
protected boolean |
collisionBetweenLinkedBodys |
protected com.bulletphysics.dynamics.constraintsolver.TypedConstraint |
constraint |
protected PhysicsRigidBody |
nodeA |
protected PhysicsRigidBody |
nodeB |
protected Vector3f |
pivotA |
protected Vector3f |
pivotB |
Modifier | Constructor and Description |
---|---|
protected |
PhysicsJoint() |
|
PhysicsJoint(PhysicsRigidBody nodeA,
PhysicsRigidBody nodeB,
Vector3f pivotA,
Vector3f pivotB) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
destroys this joint and removes it from its connected PhysicsRigidBody's joint lists
|
float |
getAppliedImpulse() |
PhysicsRigidBody |
getBodyA() |
PhysicsRigidBody |
getBodyB() |
com.bulletphysics.dynamics.constraintsolver.TypedConstraint |
getObjectId() |
Vector3f |
getPivotA() |
Vector3f |
getPivotB() |
boolean |
isCollisionBetweenLinkedBodys() |
void |
read(JmeImporter im) |
void |
setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodies)
toggles collisions between linked bodies
joint has to be removed from and added to PhysicsSpace to apply this. |
void |
write(JmeExporter ex) |
protected com.bulletphysics.dynamics.constraintsolver.TypedConstraint constraint
protected PhysicsRigidBody nodeA
protected PhysicsRigidBody nodeB
protected Vector3f pivotA
protected Vector3f pivotB
protected boolean collisionBetweenLinkedBodys
protected PhysicsJoint()
public PhysicsJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB)
nodeA
- the body for the A end (not null, alias created)nodeB
- the body for the B end (not null, alias created)pivotA
- local translation of the joint connection point in node ApivotB
- local translation of the joint connection point in node Bpublic float getAppliedImpulse()
public com.bulletphysics.dynamics.constraintsolver.TypedConstraint getObjectId()
public boolean isCollisionBetweenLinkedBodys()
public void setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodies)
collisionBetweenLinkedBodies
- set to false to have no collisions between linked bodiespublic PhysicsRigidBody getBodyA()
public PhysicsRigidBody getBodyB()
public Vector3f getPivotA()
public Vector3f getPivotB()
public void destroy()
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException