com.jme3.bullet.joints
Class HingeJoint

java.lang.Object
  extended by com.jme3.bullet.joints.PhysicsJoint
      extended by com.jme3.bullet.joints.HingeJoint
All Implemented Interfaces:
Savable

public class HingeJoint
extends PhysicsJoint

From bullet manual:
Hinge constraint, or revolute joint restricts two additional angular degrees of freedom, so the body can only rotate around one axis, the hinge axis. This can be useful to represent doors or wheels rotating around one axis. The user can specify limits and motor for the hinge.


Field Summary
protected  boolean angularOnly
           
protected  Vector3f axisA
           
protected  Vector3f axisB
           
protected  float biasFactor
           
protected  float limitSoftness
           
protected  float relaxationFactor
           
 
Fields inherited from class com.jme3.bullet.joints.PhysicsJoint
collisionBetweenLinkedBodys, nodeA, nodeB, objectId, pivotA, pivotB
 
Constructor Summary
HingeJoint()
           
HingeJoint(PhysicsRigidBody nodeA, PhysicsRigidBody nodeB, Vector3f pivotA, Vector3f pivotB, Vector3f axisA, Vector3f axisB)
          Creates a new HingeJoint
 
Method Summary
protected  void createJoint()
           
 void enableMotor(boolean enable, float targetVelocity, float maxMotorImpulse)
           
 boolean getEnableMotor()
           
 float getHingeAngle()
           
 float getLowerLimit()
           
 float getMaxMotorImpulse()
           
 float getMotorTargetVelocity()
           
 float getUpperLimit()
           
 void read(JmeImporter im)
           
 void setAngularOnly(boolean angularOnly)
           
 void setLimit(float low, float high)
           
 void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor)
           
 void write(JmeExporter ex)
           
 
Methods inherited from class com.jme3.bullet.joints.PhysicsJoint
destroy, finalize, getAppliedImpulse, getBodyA, getBodyB, getObjectId, getPivotA, getPivotB, isCollisionBetweenLinkedBodys, setCollisionBetweenLinkedBodys
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

axisA

protected Vector3f axisA

axisB

protected Vector3f axisB

angularOnly

protected boolean angularOnly

biasFactor

protected float biasFactor

relaxationFactor

protected float relaxationFactor

limitSoftness

protected float limitSoftness
Constructor Detail

HingeJoint

public HingeJoint()

HingeJoint

public HingeJoint(PhysicsRigidBody nodeA,
                  PhysicsRigidBody nodeB,
                  Vector3f pivotA,
                  Vector3f pivotB,
                  Vector3f axisA,
                  Vector3f axisB)
Creates a new HingeJoint

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

enableMotor

public void enableMotor(boolean enable,
                        float targetVelocity,
                        float maxMotorImpulse)

getEnableMotor

public boolean getEnableMotor()

getMotorTargetVelocity

public float getMotorTargetVelocity()

getMaxMotorImpulse

public float getMaxMotorImpulse()

setLimit

public void setLimit(float low,
                     float high)

setLimit

public void setLimit(float low,
                     float high,
                     float _softness,
                     float _biasFactor,
                     float _relaxationFactor)

getUpperLimit

public float getUpperLimit()

getLowerLimit

public float getLowerLimit()

setAngularOnly

public void setAngularOnly(boolean angularOnly)

getHingeAngle

public float getHingeAngle()

write

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

read

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

createJoint

protected void createJoint()