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 Link icon

    • constraint Link icon

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

      protected PhysicsRigidBody nodeA
    • nodeB Link icon

      protected PhysicsRigidBody nodeB
    • pivotA Link icon

      protected Vector3f pivotA
    • pivotB Link icon

      protected Vector3f pivotB
    • collisionBetweenLinkedBodys Link icon

      protected boolean collisionBetweenLinkedBodys
  • Constructor Details Link icon

    • PhysicsJoint Link icon

      protected PhysicsJoint()
    • PhysicsJoint Link icon

      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 Link icon

    • getAppliedImpulse Link icon

      public float getAppliedImpulse()
    • getObjectId Link icon

      public com.bulletphysics.dynamics.constraintsolver.TypedConstraint getObjectId()
      Returns:
      the constraint
    • isCollisionBetweenLinkedBodys Link icon

      public boolean isCollisionBetweenLinkedBodys()
      Returns:
      the collisionBetweenLinkedBodys
    • setCollisionBetweenLinkedBodys Link icon

      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 Link icon

      public PhysicsRigidBody getBodyA()
    • getBodyB Link icon

      public PhysicsRigidBody getBodyB()
    • getPivotA Link icon

      public Vector3f getPivotA()
    • getPivotB Link icon

      public Vector3f getPivotB()
    • destroy Link icon

      public void destroy()
      destroys this joint and removes it from its connected PhysicsRigidBody's joint lists
    • write Link icon

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

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