public class RotationMotor extends NativePhysicsObject
| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
loggerN| Constructor and Description |
|---|
RotationMotor(long nativeId)
Instantiate a motor.
|
| Modifier and Type | Method and Description |
|---|---|
float |
get(MotorParam param)
Return the value of the specified parameter.
|
boolean |
isDampingLimited()
Test whether the spring's damping is limited (native field:
m_springDampingLimited).
|
boolean |
isMotorEnabled()
Test whether the motor is enabled (native field: m_enableMotor).
|
boolean |
isServoEnabled()
Test whether the servo is enabled (native field: m_servoMotor).
|
boolean |
isSpringEnabled()
Test whether the spring is enabled (native field: m_enableSpring).
|
boolean |
isStiffnessLimited()
Test whether the spring's stiffness is limited
(m_springStiffnessLimited).
|
void |
set(MotorParam param,
float value)
Alter the specified parameter.
|
void |
setDampingLimited(boolean limitDamping)
Limit or unlimit the spring's damping (native field:
m_springDampingLimited).
|
void |
setMotorEnabled(boolean enableFlag)
Enable or disable this motor (native field: m_enableMotor).
|
void |
setServoEnabled(boolean enableFlag)
Enable or disable the servo (native field: m_servoMotor).
|
void |
setSpringEnabled(boolean enableFlag)
Enable or disable the spring (native field: m_enableSpring).
|
void |
setStiffnessLimited(boolean limitStiffness)
Limit or unlimit the spring's stiffness (native field:
m_springStiffnessLimited).
|
compareTo, countTrackers, dumpTrackers, equals, freeUnusedObjects, hasAssignedNativeObject, hashCode, nativeId, reassignNativeId, setNativeId, setNativeIdNotTracked, toString, unassignNativeObjectpublic static final java.util.logging.Logger logger
public RotationMotor(long nativeId)
nativeId - the ID of a pre-existing btRotationalLimitMotor2 (not
zero)public float get(MotorParam param)
param - which parameter (not null)public boolean isDampingLimited()
public boolean isMotorEnabled()
public boolean isServoEnabled()
public boolean isSpringEnabled()
public boolean isStiffnessLimited()
public void set(MotorParam param, float value)
param - which parameter (not null)value - the desired parameter valuepublic void setDampingLimited(boolean limitDamping)
limitDamping - true→limit, false→don't limit
(default=false)public void setMotorEnabled(boolean enableFlag)
enableFlag - true→enable, false→disable (default=false)public void setServoEnabled(boolean enableFlag)
enableFlag - true→enable, false→disable (default=false)public void setSpringEnabled(boolean enableFlag)
enableFlag - true→enable, false→disable (default=false)public void setStiffnessLimited(boolean limitStiffness)
limitStiffness - true→limit, false→don't limit
(default=false)