Package com.jme3.bullet.joints.motors
Class RotationalLimitMotor
java.lang.Object
com.jme3.bullet.NativePhysicsObject
com.jme3.bullet.joints.motors.RotationalLimitMotor
- All Implemented Interfaces:
 Comparable<NativePhysicsObject>
A motor based on Bullet's btRotationalLimitMotor, used to control the
 rotation of a SixDofJoint.
- 
Field Summary
FieldsFields inherited from class com.jme3.bullet.NativePhysicsObject
loggerN - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionfloatReturn the accumulated impulse (native field: m_accumulatedImpulse).floatgetAngle()Return this motor's current rotation angle (native field: m_currentPosition).floatReturn this motor's damping (native field: m_damping).floatgetERP()Return this motor's error-reduction parameter at the limits (native field: m_stopERP).floatReturn this motor's limit softness (native field: m_limitSoftness).floatReturn this motor's constraint lower limit (native field: m_loLimit).floatReturn the limit maximum force (native field: m_maxLimitForce).floatReturn this motor's maximum force for normal conditions (native field: m_maxMotorForce).floatReturn this motor's constraint-force mixing parameter for normal conditions (native field: m_normalCFM).floatReturn this motor's restitution at the limits (native field: m_bounce).floatReturn this motor's constraint-force mixing parameter at the limits (native field: m_stopCFM).floatReturn this motor's target velocity (native field: m_targetVelocity).floatReturn this motor's constraint upper limit (native field: m_hiLimit).booleanTest whether this motor is enabled (native field: m_enableMotor).voidsetAccumulatedImpulse(float accumulatedImpulse) Alter the accumulated impulse (native field: m_accumulatedImpulse).voidsetDamping(float damping) Alter this motor's damping (native field: m_damping).voidsetEnableMotor(boolean enableMotor) Enable or disable this motor (native field: m_enableMotor).voidsetERP(float erp) Alter this motor's error-reduction parameter at the limits (native field: m_stopERP).voidsetLimitSoftness(float limitSoftness) Alter this motor's limit softness (native field: m_limitSoftness).voidsetLowerLimit(float lowerLimit) Alter this motor's constraint lower limit (native field: m_loLimit).voidsetMaxLimitForce(float maxLimitForce) Alter the limit maximum force (native field: m_maxLimitForce).voidsetMaxMotorForce(float maxMotorForce) Alter this motor's maximum force (native field: m_maxMotorForce).voidsetNormalCFM(float cfm) Alter this motor's constraint-force mixing parameter for normal conditions (native field: m_normalCFM).voidsetRestitution(float restitution) Alter this motor's restitution at the limits (native field: m_bounce).voidsetStopCFM(float cfm) Alter this motor's constraint-force mixing parameter at the limits (native field: m_stopCFM).voidsetTargetVelocity(float targetVelocity) Alter this motor's target velocity (native field: m_targetVelocity).voidsetUpperLimit(float upperLimit) Alter this motor's constraint upper limit (native field: m_hiLimit).Methods inherited from class com.jme3.bullet.NativePhysicsObject
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, toString, unassignNativeObject 
- 
Field Details
- 
logger
message logger for this class 
 - 
 - 
Constructor Details
- 
RotationalLimitMotor
public RotationalLimitMotor(long nativeId) Instantiate a motor. Used internally.- Parameters:
 nativeId- the ID of the pre-existing btRotationalLimitMotor (not zero)
 
 - 
 - 
Method Details
- 
getAccumulatedImpulse
public float getAccumulatedImpulse()Return the accumulated impulse (native field: m_accumulatedImpulse).- Returns:
 - the total impulse
 
 - 
getAngle
public float getAngle()Return this motor's current rotation angle (native field: m_currentPosition).- Returns:
 - the angle (in radians)
 
 - 
getDamping
public float getDamping()Return this motor's damping (native field: m_damping).- Returns:
 - the viscous damping ratio (0→no damping, 1→critically damped)
 
 - 
getERP
public float getERP()Return this motor's error-reduction parameter at the limits (native field: m_stopERP).- Returns:
 - the error-reduction parameter (≥0)
 
 - 
getLimitSoftness
public float getLimitSoftness()Return this motor's limit softness (native field: m_limitSoftness).- Returns:
 - the limit softness (or relaxation factor)
 
 - 
getLowerLimit
public float getLowerLimit()Return this motor's constraint lower limit (native field: m_loLimit).- Returns:
 - the limit value
 
 - 
getMaxLimitForce
public float getMaxLimitForce()Return the limit maximum force (native field: m_maxLimitForce).- Returns:
 - the maximum force on the limit (default=300)
 
 - 
getMaxMotorForce
public float getMaxMotorForce()Return this motor's maximum force for normal conditions (native field: m_maxMotorForce).- Returns:
 - the maximum force
 
 - 
getNormalCFM
public float getNormalCFM()Return this motor's constraint-force mixing parameter for normal conditions (native field: m_normalCFM).- Returns:
 - the mixing parameter (≥0)
 
 - 
getRestitution
public float getRestitution()Return this motor's restitution at the limits (native field: m_bounce).- Returns:
 - the restitution (bounce) factor
 
 - 
getStopCFM
public float getStopCFM()Return this motor's constraint-force mixing parameter at the limits (native field: m_stopCFM).- Returns:
 - the mixing parameter (≥0)
 
 - 
getTargetVelocity
public float getTargetVelocity()Return this motor's target velocity (native field: m_targetVelocity).- Returns:
 - the target velocity (in radians per second)
 
 - 
getUpperLimit
public float getUpperLimit()Return this motor's constraint upper limit (native field: m_hiLimit).- Returns:
 - the limit value
 
 - 
isEnableMotor
public boolean isEnableMotor()Test whether this motor is enabled (native field: m_enableMotor).- Returns:
 - true if enabled, otherwise false
 
 - 
setAccumulatedImpulse
public void setAccumulatedImpulse(float accumulatedImpulse) Alter the accumulated impulse (native field: m_accumulatedImpulse).- Parameters:
 accumulatedImpulse- the desired total (default=0)
 - 
setDamping
public void setDamping(float damping) Alter this motor's damping (native field: m_damping).- Parameters:
 damping- the desired viscous damping ratio (0→no damping, 1→critically damped, default=1)
 - 
setEnableMotor
public void setEnableMotor(boolean enableMotor) Enable or disable this motor (native field: m_enableMotor).- Parameters:
 enableMotor- true→enable, false→disable (default=false)
 - 
setERP
public void setERP(float erp) Alter this motor's error-reduction parameter at the limits (native field: m_stopERP).- Parameters:
 erp- the desired error tolerance at limits (≥0, default=0.2)
 - 
setLimitSoftness
public void setLimitSoftness(float limitSoftness) Alter this motor's limit softness (native field: m_limitSoftness).- Parameters:
 limitSoftness- the desired limit softness (or relaxation factor) (default=0.5)
 - 
setLowerLimit
public void setLowerLimit(float lowerLimit) Alter this motor's constraint lower limit (native field: m_loLimit).- Parameters:
 lowerLimit- the desired limit value (default=1)
 - 
setMaxLimitForce
public void setMaxLimitForce(float maxLimitForce) Alter the limit maximum force (native field: m_maxLimitForce).- Parameters:
 maxLimitForce- the desired maximum force on the limit (default=300)
 - 
setMaxMotorForce
public void setMaxMotorForce(float maxMotorForce) Alter this motor's maximum force (native field: m_maxMotorForce).- Parameters:
 maxMotorForce- the desired maximum force (default=6)
 - 
setNormalCFM
public void setNormalCFM(float cfm) Alter this motor's constraint-force mixing parameter for normal conditions (native field: m_normalCFM).- Parameters:
 cfm- the desired mixing parameter (≥0, default=0)
 - 
setRestitution
public void setRestitution(float restitution) Alter this motor's restitution at the limits (native field: m_bounce).- Parameters:
 restitution- the desired restitution (bounce) factor (default=0)
 - 
setStopCFM
public void setStopCFM(float cfm) Alter this motor's constraint-force mixing parameter at the limits (native field: m_stopCFM).- Parameters:
 cfm- the desired mixing parameter (≥0, default=0)
 - 
setTargetVelocity
public void setTargetVelocity(float targetVelocity) Alter this motor's target velocity (native field: m_targetVelocity).- Parameters:
 targetVelocity- the desired target velocity (in radians per second, default=0)
 - 
setUpperLimit
public void setUpperLimit(float upperLimit) Alter this motor's constraint upper limit (native field: m_hiLimit).- Parameters:
 upperLimit- the desired limit value (default=-1)
 
 -