public class TranslationalLimitMotor
extends java.lang.Object
Constructor and Description |
---|
TranslationalLimitMotor(long motor)
Instantiate a motor for the identified btTranslationalLimitMotor.
|
Modifier and Type | Method and Description |
---|---|
Vector3f |
getAccumulatedImpulse()
Copy the accumulated impulse.
|
float |
getDamping()
Read this motor's damping.
|
float |
getLimitSoftness()
Read this motor's limit softness.
|
Vector3f |
getLowerLimit()
Copy this motor's constraint lower limits.
|
long |
getMotor()
Read the id of the btTranslationalLimitMotor.
|
float |
getRestitution()
Read this motor's restitution.
|
Vector3f |
getUpperLimit()
Copy this motor's constraint upper limits.
|
boolean |
isEnabled(int axisIndex)
Test whether the indexed axis is enabled.
|
void |
setAccumulatedImpulse(Vector3f accumulatedImpulse)
Alter the accumulated impulse.
|
void |
setDamping(float damping)
Alter this motor's damping.
|
void |
setEnabled(int axisIndex,
boolean enableMotor)
Enable or disable the indexed axis.
|
void |
setLimitSoftness(float limitSoftness)
Alter the limit softness.
|
void |
setLowerLimit(Vector3f lowerLimit)
Alter the constraint lower limits.
|
void |
setRestitution(float restitution)
Alter this motor's restitution.
|
void |
setUpperLimit(Vector3f upperLimit)
Alter the constraint upper limits.
|
public TranslationalLimitMotor(long motor)
motor
- the unique identifier (not zero)public long getMotor()
public Vector3f getLowerLimit()
public void setLowerLimit(Vector3f lowerLimit)
lowerLimit
- (unaffected, not null)public Vector3f getUpperLimit()
public void setUpperLimit(Vector3f upperLimit)
upperLimit
- (unaffected, not null)public Vector3f getAccumulatedImpulse()
public void setAccumulatedImpulse(Vector3f accumulatedImpulse)
accumulatedImpulse
- the desired vector (not null, unaffected)public float getLimitSoftness()
public void setLimitSoftness(float limitSoftness)
limitSoftness
- the desired limit softness (default=0.5)public float getDamping()
public void setDamping(float damping)
damping
- the desired viscous damping ratio (0→no damping,
1→critically damped, default=1)public float getRestitution()
public void setRestitution(float restitution)
restitution
- the desired restitution (bounce) factorpublic void setEnabled(int axisIndex, boolean enableMotor)
axisIndex
- which axis: 0→X, 1→Y, 2→ZenableMotor
- true→enable, false→disable (default=false)public boolean isEnabled(int axisIndex)
axisIndex
- which axis: 0→X, 1→Y, 2→Z