public class RangeOfMotion extends java.lang.Object implements Savable
read(com.jme3.export.JmeImporter)
.
This class is shared between JBullet and Native Bullet.
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
Constructor and Description |
---|
RangeOfMotion()
Instantiate a preset with no motion allowed.
|
RangeOfMotion(float maxAngle)
Instantiate a preset with the specified symmetric range of motion.
|
RangeOfMotion(float maxX,
float maxY,
float maxZ)
Instantiate a preset with the specified symmetric range of motion.
|
RangeOfMotion(float maxX,
float minX,
float maxY,
float minY,
float maxZ,
float minZ)
Instantiate a preset with the specified range of motion.
|
RangeOfMotion(int axisIndex)
Instantiate a preset for rotation on a single axis.
|
Modifier and Type | Method and Description |
---|---|
float |
getMaxRotation(int axisIndex)
Read the maximum rotation around the indexed axis.
|
float |
getMinRotation(int axisIndex)
Read the minimum rotation around the indexed axis.
|
void |
read(JmeImporter im)
De-serialize this preset, for example when loading from a J3O file.
|
void |
setupJoint(SixDofJoint joint)
Apply this preset to the specified joint.
|
void |
write(JmeExporter ex)
Serialize this preset, for example when saving to a J3O file.
|
public static final java.util.logging.Logger logger
public RangeOfMotion()
public RangeOfMotion(float maxX, float minX, float maxY, float minY, float maxZ, float minZ)
maxX
- the maximum rotation around the X axis (in radians)minX
- the minimum rotation around the X axis (in radians)maxY
- the maximum rotation around the Y axis (in radians)minY
- the minimum rotation around the Y axis (in radians)maxZ
- the maximum rotation around the Z axis (in radians)minZ
- the minimum rotation around the Z axis (in radians)public RangeOfMotion(float maxX, float maxY, float maxZ)
maxX
- the maximum rotation around the X axis (in radians, ≥0)maxY
- the maximum rotation around the Y axis (in radians, ≥0)maxZ
- the maximum rotation around the Z axis (in radians, ≥0)public RangeOfMotion(float maxAngle)
maxAngle
- the maximum rotation around each axis (in radians, ≥0)public RangeOfMotion(int axisIndex)
axisIndex
- which axis: 0→X, 1→Y, 2→Zpublic float getMaxRotation(int axisIndex)
axisIndex
- which axis: 0→X, 1→Y, 2→Zpublic float getMinRotation(int axisIndex)
axisIndex
- which axis: 0→X, 1→Y, 2→Zpublic void setupJoint(SixDofJoint joint)
joint
- where to apply this preset (not null, modified)public void read(JmeImporter im) throws java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException