com.jme3.bullet.joints
Class HingeJoint
java.lang.Object
com.jme3.bullet.joints.PhysicsJoint
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.
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
axisA
protected Vector3f axisA
axisB
protected Vector3f axisB
angularOnly
protected boolean angularOnly
biasFactor
protected float biasFactor
relaxationFactor
protected float relaxationFactor
limitSoftness
protected float limitSoftness
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 ApivotB
- local translation of the joint connection point in node B
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()