Package com.jme3.bullet.joints.motors
Enum Class MotorParam
- All Implemented Interfaces:
Serializable
,Comparable<MotorParam>
,Constable
Enumerate certain parameters of a RotationMotor or TranslationMotor, based on
Bullet's btConstraintParams.
- See Also:
-
RotationMotor.get(com.jme3.bullet.joints.motors.MotorParam)
RotationMotor.set(com.jme3.bullet.joints.motors.MotorParam, float)
TranslationMotor.get(com.jme3.bullet.joints.motors.MotorParam, com.jme3.math.Vector3f)
TranslationMotor.set(com.jme3.bullet.joints.motors.MotorParam, com.jme3.math.Vector3f)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionrestitution/bounce factor at the limits (m_bounce, default=0)spring's viscous damping ratio (m_springDamping, default=0)spring's equilibrium point (m_equilibriumPoint, default=0)constraint lower limit (m_loLimit/m_lowerLimit, default=1[rot] or 0[translate])maximum motor force (m_maxMotorForce, default=6[rot] or 0[translate])constraint-force mixing parameter between limits (m_motorCFM, native name: BT_CONSTRAINT_CFM, default=0)error-reduction parameter between limits (m_motorERP, native name: BT_CONSTRAINT_ERP, default=0.9)servo's target (m_servoTarget, default=0)spring's stiffness (m_springStiffness, default=0)constraint-force mixing parameter at limits (m_stopCFM, native name: BT_CONSTRAINT_STOP_CFM, default=0)error-reduction parameter at limits (m_stopERP, native name: BT_CONSTRAINT_STOP_ERP, default=0.2)motor's target velocity (m_targetVelocity, default=0)constraint upper limit (m_hiLimit/m_upperLimit, default=-1[rot] or 0[translate]) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canSet
(float value) Test whether this parameter can be set to the specified value.float
Determine the default value for this parameter in a RotationMotor.float
Determine the default value for this parameter in a TranslationMotor.float
maxValue()
Determine the maximum value for this parameter.float
minValue()
Determine the minimum value for this parameter.int
Determine the parameter's index in native code.Determine the serialization-tag suffix for this parameter.static MotorParam
Returns the enum constant of this class with the specified name.static MotorParam[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Bounce
restitution/bounce factor at the limits (m_bounce, default=0) -
Damping
spring's viscous damping ratio (m_springDamping, default=0) -
Equilibrium
spring's equilibrium point (m_equilibriumPoint, default=0) -
LowerLimit
constraint lower limit (m_loLimit/m_lowerLimit, default=1[rot] or 0[translate]) -
MaxMotorForce
maximum motor force (m_maxMotorForce, default=6[rot] or 0[translate]) -
MotorCfm
constraint-force mixing parameter between limits (m_motorCFM, native name: BT_CONSTRAINT_CFM, default=0) -
MotorErp
error-reduction parameter between limits (m_motorERP, native name: BT_CONSTRAINT_ERP, default=0.9) -
ServoTarget
servo's target (m_servoTarget, default=0) -
Stiffness
spring's stiffness (m_springStiffness, default=0) -
StopCfm
constraint-force mixing parameter at limits (m_stopCFM, native name: BT_CONSTRAINT_STOP_CFM, default=0) -
StopErp
error-reduction parameter at limits (m_stopERP, native name: BT_CONSTRAINT_STOP_ERP, default=0.2) -
TargetVelocity
motor's target velocity (m_targetVelocity, default=0) -
UpperLimit
constraint upper limit (m_hiLimit/m_upperLimit, default=-1[rot] or 0[translate])
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
canSet
public boolean canSet(float value) Test whether this parameter can be set to the specified value.- Parameters:
value
- the desired parameter value- Returns:
- true if settable, otherwise false
-
defaultForRotationMotor
public float defaultForRotationMotor()Determine the default value for this parameter in a RotationMotor.- Returns:
- the default parameter value
-
defaultForTranslationMotor
public float defaultForTranslationMotor()Determine the default value for this parameter in a TranslationMotor.- Returns:
- the default parameter value
-
maxValue
public float maxValue()Determine the maximum value for this parameter.- Returns:
- a maximum value, or Float.MAX_VALUE if there's no maximum
-
minValue
public float minValue()Determine the minimum value for this parameter.- Returns:
- a minimum value, or -Float.MAX_VALUE if there's no minimum
-
nativeIndex
public int nativeIndex()Determine the parameter's index in native code.- Returns:
- the index
-
tagSuffix
Determine the serialization-tag suffix for this parameter.- Returns:
- the tag suffix
-