Package com.jme3.bullet.joints
Class PhysicsJoint
java.lang.Object
com.jme3.bullet.joints.PhysicsJoint
- All Implemented Interfaces:
Savable
- Direct Known Subclasses:
ConeJoint
,HingeJoint
,Point2PointJoint
,SixDofJoint
,SliderJoint
PhysicsJoint - Basic Physics Joint
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected com.bulletphysics.dynamics.constraintsolver.TypedConstraint
protected PhysicsRigidBody
protected PhysicsRigidBody
protected Vector3f
protected Vector3f
-
Constructor Summary
ModifierConstructorDescriptionprotected
PhysicsJoint
(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
destroys this joint and removes it from its connected PhysicsRigidBody's joint listsfloat
getBodyA()
getBodyB()
com.bulletphysics.dynamics.constraintsolver.TypedConstraint
boolean
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)
-
Field Details
-
constraint
protected com.bulletphysics.dynamics.constraintsolver.TypedConstraint constraint -
nodeA
-
nodeB
-
pivotA
-
pivotB
-
collisionBetweenLinkedBodys
protected boolean collisionBetweenLinkedBodys
-
-
Constructor Details
-
PhysicsJoint
protected PhysicsJoint() -
PhysicsJoint
public PhysicsJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB) - Parameters:
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 B
-
-
Method Details
-
getAppliedImpulse
public float getAppliedImpulse() -
getObjectId
public com.bulletphysics.dynamics.constraintsolver.TypedConstraint getObjectId()- Returns:
- the constraint
-
isCollisionBetweenLinkedBodys
public boolean isCollisionBetweenLinkedBodys()- Returns:
- the collisionBetweenLinkedBodys
-
setCollisionBetweenLinkedBodys
public void setCollisionBetweenLinkedBodys(boolean collisionBetweenLinkedBodies) toggles collisions between linked bodies
joint has to be removed from and added to PhysicsSpace to apply this.- Parameters:
collisionBetweenLinkedBodies
- set to false to have no collisions between linked bodies
-
getBodyA
-
getBodyB
-
getPivotA
-
getPivotB
-
destroy
public void destroy()destroys this joint and removes it from its connected PhysicsRigidBody's joint lists -
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
IOException
-