public class SkeletonDebugger extends Object
Helper class to visually represent a SkeletonPose
.
This class is adapted from Ardor3D.
Modifier and Type | Field and Description |
---|---|
static float |
DEFAULT_BONE_SCALE
Default value of bone scale.
|
static float |
DEFAULT_JOINT_SCALE
Default value of joint scale.
|
static float |
minBoneLength
Minimum length of a bone.
|
Constructor and Description |
---|
SkeletonDebugger(SkeletonPose pose,
float boneScale,
float jointScale,
int... ignoreJoints)
Creates a new Debugger with given scale.
|
SkeletonDebugger(SkeletonPose pose,
int... ignoreJoints)
Creates a new Debugger with
DEFAULT_BONE_SCALE and DEFAULT_JOINT_SCALE |
Modifier and Type | Method and Description |
---|---|
void |
addToWorld(World world)
Adds all joint and bone objects to given world.
|
List<Object3D> |
getBoneObjects()
Returns the
Object3D s which represent bones. |
List<Object3D> |
getJointObjects()
Returns the
Object3D s which represent joints. |
void |
setVisibility(boolean visible)
Sets visibility of joint and bone objects.
|
void |
update(SkeletonPose pose)
Updates bone and joint objects according to given pose.
|
public static float minBoneLength
public static final float DEFAULT_BONE_SCALE
public static final float DEFAULT_JOINT_SCALE
public SkeletonDebugger(SkeletonPose pose, int... ignoreJoints)
DEFAULT_BONE_SCALE
and DEFAULT_JOINT_SCALE
pose
- the pose this debugger representsignoreJoints
- these joints and the bones associated with them will not be displayed.public SkeletonDebugger(SkeletonPose pose, float boneScale, float jointScale, int... ignoreJoints)
pose
- the pose this debugger representsboneScale
- scale of boneignoreJoints
- these joints and the bones associated with them will not be displayed.Primitives.getPyramide(float, float)
public List<Object3D> getBoneObjects()
Object3D
s which represent bones. Some of them may be null.public List<Object3D> getJointObjects()
Object3D
s which represent joints. Bones are virtual links
between a joint and its parent (if any)
Some of them may be null.public void update(SkeletonPose pose)
public void addToWorld(World world)
public void setVisibility(boolean visible)