public class Bone extends A3DObject
Bone
object cannot be used directly, a SkinDeformer
instance is used to deform the geometry, and SkinDeformer
comes with a set of bones, each bone linked to a node.
NOTE: A control point of a geometry can be bounded to more than one Bones.name, properties
Constructor and Description |
---|
Bone()
Initializes a new instance of the
Bone class. |
Bone(java.lang.String name)
Initializes a new instance of the
Bone class. |
Modifier and Type | Method and Description |
---|---|
double |
get(int index)
Gets the blend weight of specified control point
|
Matrix4 |
getBoneTransform()
Gets the transform matrix of the bone.
|
Node |
getNode()
Gets the node.
|
Matrix4 |
getTransform()
Gets the transform matrix of the node containing the bone.
|
double |
getWeight(int index)
Gets the weight for control point specified by index
|
int |
getWeightCount()
Gets the count of weight, this is automatically extended by
setWeight(int, double) |
void |
set(int index,
double value)
Sets the blend weight of specified control point
|
void |
setBoneTransform(Matrix4 value)
Sets the transform matrix of the bone.
|
void |
setNode(Node value)
Sets the node.
|
void |
setTransform(Matrix4 value)
Sets the transform matrix of the node containing the bone.
|
void |
setWeight(int index,
double weight)
Sets the weight for control point specified by index
|
findProperty, getName, getProperties, getProperty, removeProperty, removeProperty, setName, setProperty
public Bone(java.lang.String name)
Bone
class.name
- Name.public Bone()
Bone
class.public double get(int index)
index
- public void set(int index, double value)
index
- value
- New valuepublic double getWeight(int index)
index
- Control point's indexpublic void setWeight(int index, double weight)
index
- Control point's indexweight
- New weightpublic int getWeightCount()
setWeight(int, double)
public Matrix4 getTransform()
public void setTransform(Matrix4 value)
value
- New valuepublic Matrix4 getBoneTransform()
public void setBoneTransform(Matrix4 value)
value
- New valuepublic Node getNode()
SkinDeformer
will use bone node to influence the displacement of the control points.
Bone node usually has a Skeleton
attached, but it's not required.
Attached Skeleton
is usually used by DCC software to show skeleton to user.public void setNode(Node value)
SkinDeformer
will use bone node to influence the displacement of the control points.
Bone node usually has a Skeleton
attached, but it's not required.
Attached Skeleton
is usually used by DCC software to show skeleton to user.value
- New value