|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Node
com.jme.animation.Bone
public class Bone
Bone defines a scenegraph node that defines a single bone object within a skeletal system. The bone defines a bind matrix which will transform the bone into the pose position. This bine matrix is used to position the bone with the skin, then move the skin to its world position.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
protected AnimationController |
animationController
|
protected Matrix4f |
bindMatrix
|
protected boolean |
boneChanged
|
protected java.util.ArrayList<BoneChangeListener> |
changeListeners
|
protected Quaternion |
oldRot
|
protected Vector3f |
oldScale
|
protected Vector3f |
oldTran
|
protected boolean |
skinRoot
|
protected Matrix4f |
transform
|
protected Vector3f |
workVectA
|
Fields inherited from class com.jme.scene.Node |
---|
children |
Fields inherited from class com.jme.scene.Spatial |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
Constructor Summary | |
---|---|
Bone()
|
|
Bone(java.lang.String name)
Creates a new bone with the supplied name. |
|
Bone(java.lang.String name,
Matrix4f bindMatrix)
creates a new bone with a given name and a bind matrix. |
Method Summary | |
---|---|
void |
addBoneListener(BoneChangeListener listener)
|
void |
addController(Controller c)
Adds a Controller to this Spatial's list of controllers. |
void |
applyBone(BoneInfluence inf,
Vector3f vstore,
Vector3f nstore)
applyBone affects a given vertex by its current world position. |
void |
copyBindings(Bone newBone)
copyBindings sets the bone's bone matrix of an incoming skeleton (or subskeleton) to that of the matching bone of this skeleton. |
protected void |
fireBoneChange()
|
AnimationController |
getAnimationController()
|
Matrix4f |
getBindMatrix()
retrieves the bind matrix of this bone. |
protected int |
getListenerQuantity()
|
Bone |
getRootSkeleton()
|
protected boolean |
hasTransformChanged()
|
boolean |
isHardpoint()
|
boolean |
isSkinRoot()
|
void |
propogateBoneChange(boolean initiator)
|
void |
propogateBoneChangeToChildren(boolean initiator)
|
void |
propogateBoneChangeToParent(boolean initiator)
|
void |
read(JMEImporter e)
|
void |
removeBoneListener(BoneChangeListener listener)
|
void |
resetChangeValues()
|
void |
revertToBind()
|
void |
setBindMatrix(Matrix4f bindMatrix)
sets the bind matrix of this bone. |
void |
setHardpoint(boolean isHardpoint)
|
void |
setLocalRotation(Matrix3f rotation)
setLocalRotation sets the local rotation of this node. |
void |
setLocalRotation(Quaternion quaternion)
setLocalRotation sets the local rotation of this node,
using a quaterion to build the matrix. |
void |
setLocalScale(float localScale)
setLocalScale sets the local scale of this node. |
void |
setLocalScale(Vector3f localScale)
setLocalScale sets the local scale of this node. |
void |
setLocalTranslation(Vector3f localTranslation)
setLocalTranslation sets the local translation of this
node. |
static void |
setOptimizeTransform(boolean enabled)
Switches the transform optimization on or off. |
void |
setSkinRoot(boolean skinRoot)
|
void |
update()
Updates this bone's useTransform and then calls its children recursively. |
void |
updateGeometricState(float time,
boolean initiator)
updateGeometricState updates all the geometry information
for the node. |
void |
updateWorldVectors()
If not locked, updates worldscale, worldrotation and worldtranslation |
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.Node |
---|
applyRenderState, attachChild, attachChildAt, childChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, setModelBound, sortLights, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, updateWorldVectors |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Field Detail |
---|
protected Matrix4f bindMatrix
protected AnimationController animationController
protected final Vector3f workVectA
protected final Matrix4f transform
protected Vector3f oldScale
protected Vector3f oldTran
protected Quaternion oldRot
protected transient boolean boneChanged
protected transient boolean skinRoot
protected transient java.util.ArrayList<BoneChangeListener> changeListeners
Constructor Detail |
---|
public Bone()
public Bone(java.lang.String name)
name
- the name of this bone.public Bone(java.lang.String name, Matrix4f bindMatrix)
name
- the name of the bone.bindMatrix
- the bind matrix of the bone.Method Detail |
---|
public static void setOptimizeTransform(boolean enabled)
enabled
- true
switches the transform optimization onpublic void update()
public void copyBindings(Bone newBone)
newBone
- the bone to copy the bindings to.public void applyBone(BoneInfluence inf, Vector3f vstore, Vector3f nstore)
inf
- the influence this bone affects the vertex. Including its
offset and weight.vstore
- the vertex to manipulate.nstore
- the normal to manipulate.public Matrix4f getBindMatrix()
public void setBindMatrix(Matrix4f bindMatrix)
bindMatrix
- the bind matrix of this bone.public void addController(Controller c)
Spatial
addController
in class Spatial
c
- The Controller to addController
public void updateGeometricState(float time, boolean initiator)
Spatial
updateGeometricState
updates all the geometry information
for the node.
updateGeometricState
in class Spatial
time
- the frame time.initiator
- true if this node started the update process.public void resetChangeValues()
public void updateWorldVectors()
Spatial
updateWorldVectors
in class Spatial
public AnimationController getAnimationController()
public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class Node
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class Node
java.io.IOException
public void revertToBind()
public Bone getRootSkeleton()
public void addBoneListener(BoneChangeListener listener)
public void removeBoneListener(BoneChangeListener listener)
protected int getListenerQuantity()
protected void fireBoneChange()
public boolean isSkinRoot()
public void setSkinRoot(boolean skinRoot)
public void propogateBoneChangeToParent(boolean initiator)
public void propogateBoneChangeToChildren(boolean initiator)
protected boolean hasTransformChanged()
public void propogateBoneChange(boolean initiator)
public void setLocalRotation(Matrix3f rotation)
Spatial
setLocalRotation
sets the local rotation of this node.
setLocalRotation
in class Spatial
rotation
- the new local rotation.public void setLocalRotation(Quaternion quaternion)
Spatial
setLocalRotation
sets the local rotation of this node,
using a quaterion to build the matrix.
setLocalRotation
in class Spatial
quaternion
- the quaternion that defines the matrix.public void setLocalTranslation(Vector3f localTranslation)
Spatial
setLocalTranslation
sets the local translation of this
node.
setLocalTranslation
in class Spatial
localTranslation
- the local translation of this node.public void setLocalScale(Vector3f localScale)
Spatial
setLocalScale
sets the local scale of this node.
setLocalScale
in class Spatial
localScale
- the new local scale.public void setLocalScale(float localScale)
Spatial
setLocalScale
sets the local scale of this node.
setLocalScale
in class Spatial
localScale
- the new local scale, applied to x, y and zpublic boolean isHardpoint()
public void setHardpoint(boolean isHardpoint)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |