Class PhysicsJoint

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

public abstract class PhysicsJoint extends Object implements Savable

PhysicsJoint - Basic Physics Joint

  • Field Details

    • constraint

      protected com.bulletphysics.dynamics.constraintsolver.TypedConstraint constraint
    • nodeA

      protected PhysicsRigidBody nodeA
    • nodeB

      protected PhysicsRigidBody nodeB
    • pivotA

      protected Vector3f pivotA
    • pivotB

      protected Vector3f 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 A
      pivotB - 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

      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 PhysicsRigidBody's joint lists
    • write

      public void write(JmeExporter ex) throws IOException
      Specified by:
      write in interface Savable
      Throws:
      IOException
    • read

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