public class Joint extends Object implements Serializable
A Joint in a Skeleton
. A Joint essentially consists of an Invert Bind Pose matrix and a parent id.
This class is adapted from Ardor3D.
Modifier and Type | Field and Description |
---|---|
static int |
NO_PARENT
Parent index of a joint which has no parent
|
Constructor and Description |
---|
Joint(Matrix inverseBindPose,
int index,
int parentIndex,
String name)
Creates a new Joint.
|
Modifier and Type | Method and Description |
---|---|
Matrix |
getBindPose()
Returns a copy bindPose matrix.
|
int |
getIndex()
Returns the index of this joint.
|
Matrix |
getInverseBindPose()
Returns a copy of invertBindPose matrix
|
String |
getName()
Returns name of this joint.
|
int |
getParentIndex()
Returns the index of parent of this joint.
|
boolean |
hasParent()
Returns true if this joint has a parent.
|
public static final int NO_PARENT
public Joint(Matrix inverseBindPose, int index, int parentIndex, String name)
Creates a new Joint.
inverseBindPose
- the inverse bind pose matrixindex
- the intended index in skeletonparentIndex
- index of parent joint or NO_PARENT
if has no parent.
if has a parent, parent index should be less than joint's indexname
- name of this joint. maybe nullpublic Matrix getInverseBindPose()
public Matrix getBindPose()
public int getIndex()
public int getParentIndex()
NO_PARENT
if this joint has no parent.public String getName()
public boolean hasParent()