com.jme3.bullet.joints
Class PhysicsJoint

java.lang.Object
  extended by com.jme3.bullet.joints.PhysicsJoint
All Implemented Interfaces:
Savable
Direct Known Subclasses:
ConeJoint, HingeJoint, Point2PointJoint, SixDofJoint, SliderJoint

public abstract class PhysicsJoint
extends java.lang.Object
implements Savable

PhysicsJoint - Basic Phyiscs Joint


Field Summary
protected  boolean collisionBetweenLinkedBodys
           
protected  PhysicsRigidBody nodeA
           
protected  PhysicsRigidBody nodeB
           
protected  long objectId
           
protected  Vector3f pivotA
           
protected  Vector3f pivotB
           
 
Constructor Summary
PhysicsJoint()
           
PhysicsJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB)
           
 
Method Summary
 void destroy()
          destroys this joint and removes it from its connected PhysicsRigidBodys joint lists
protected  void finalize()
           
 float getAppliedImpulse()
           
 PhysicsRigidBody getBodyA()
           
 PhysicsRigidBody getBodyB()
           
 long getObjectId()
           
 Vector3f getPivotA()
           
 Vector3f getPivotB()
           
 boolean isCollisionBetweenLinkedBodys()
           
 void read(JmeImporter im)
           
 void setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodys)
          toggles collisions between linked bodys
joint has to be removed from and added to PhyiscsSpace to apply this.
 void write(JmeExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectId

protected long objectId

nodeA

protected PhysicsRigidBody nodeA

nodeB

protected PhysicsRigidBody nodeB

pivotA

protected Vector3f pivotA

pivotB

protected Vector3f pivotB

collisionBetweenLinkedBodys

protected boolean collisionBetweenLinkedBodys
Constructor Detail

PhysicsJoint

public PhysicsJoint()

PhysicsJoint

public PhysicsJoint(PhysicsRigidBody nodeA,
                    PhysicsRigidBody nodeB,
                    Vector3f pivotA,
                    Vector3f pivotB)
Parameters:
pivotA - local translation of the joint connection point in node A
pivotB - local translation of the joint connection point in node B
Method Detail

getAppliedImpulse

public float getAppliedImpulse()

getObjectId

public long getObjectId()
Returns:
the constraint

isCollisionBetweenLinkedBodys

public boolean isCollisionBetweenLinkedBodys()
Returns:
the collisionBetweenLinkedBodys

setCollisionBetweenLinkedBodys

public void setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodys)
toggles collisions between linked bodys
joint has to be removed from and added to PhyiscsSpace to apply this.

Parameters:
collisionBetweenLinkedBodys - set to false to have no collisions between linked bodys

getBodyA

public PhysicsRigidBody getBodyA()

getBodyB

public PhysicsRigidBody getBodyB()

getPivotA

public Vector3f getPivotA()

getPivotB

public Vector3f getPivotB()

destroy

public void destroy()
destroys this joint and removes it from its connected PhysicsRigidBodys joint lists


write

public void write(JmeExporter ex)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable