com.jme.animation
Class SkinTransferNode

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Node
          extended by com.jme.animation.SkinNode
              extended by com.jme.animation.SkinTransferNode
All Implemented Interfaces:
BoneChangeListener, Savable, java.io.Serializable

public class SkinTransferNode
extends SkinNode

A non-parented SkinNode which is enforced to be used only for holding SkinNode Geometry skins.

Specifically, this SkinNode will throw if you attempt to parent it, or if you attempt to set skeleton, controller, animation, or other non-skin-geometry properties.

This class is intended to be used for classes dedicated for usage as a SkinNode.assimilate() targets.

Especially useful is the skinRegion attribute. Unlike normal SkinNodes, this class does not allow different skinRegions per Geometry, but the skinRegion of this SkinTransferNode applies to all its Geometries. When a SkinTransferNode is assimilated which has a non-null skinRegion, it will replace all currently loaded skin Geometries of that same skinRegion. (Except for same-named Geometries, which are retained instead of replaced).

Author:
Blaine Simpson (blaine dot simpson at admc dot com)
See Also:
SkinNode.assimilate(SkinNode), Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme.scene.Spatial
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode
 
Field Summary
protected  java.lang.String skinRegion
           
 
Fields inherited from class com.jme.animation.SkinNode
bindMatrix, cache, connectionPoints, geometryRegions, needsRefresh, newSkeletonAssigned, normal, skeleton, skins, vertex
 
Fields inherited from class com.jme.scene.Node
children
 
Fields inherited from class com.jme.scene.Spatial
collisionBits, cullHint, frustrumIntersects, geometricalControllers, 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
SkinTransferNode()
          Empty Constructor to be used internally only.
SkinTransferNode(java.lang.String name)
           
 
Method Summary
 void addBoneInfluence(int geomIndex, int vert, Bone bone, float weight)
          Do not use thos method with SkinTransferNodes.
 void assignSkeletonBoneInfluences()
          Do not use thos method with SkinTransferNodes.
protected  void assimilate(Geometry newSkinGeo, java.util.ArrayList<BoneInfluence>[] newInfluences)
          Do not use thos method with SkinTransferNodes.
 java.lang.String getAnimationString()
           
 Bone getSkeleton()
           
 java.lang.String getSkinRegion()
           
 boolean hasSkinGeometry(java.lang.String geoName, java.lang.String matchSkinRegion)
           
 void read(JMEImporter e)
           
 void regenInfluenceOffsets()
          Do not use thos method with SkinTransferNodes.
 void remapInfluences(VertMap mappings, int geomIndex)
          Do not use thos method with SkinTransferNodes.
 void setAnimation(BoneAnimation anim)
          Do not use thos method with SkinTransferNodes.
 void setAnimation(int index)
          Do not use thos method with SkinTransferNodes.
 void setAnimation(java.lang.String name)
          Do not use thos method with SkinTransferNodes.
 void setBindMatrix(Matrix4f mat)
          Do not use thos method with SkinTransferNodes.
protected  void setParent(Node parent)
          Do not use thos method with SkinTransferNodes.
 void setSkeleton(Bone b)
          Do not use thos method with SkinTransferNodes.
 void setSkinRegion(Geometry skinGeometry, java.lang.String skinRegion)
          Do not use thos method with SkinTransferNodes.
 void setSkinRegion(java.lang.String skinRegion)
          Sets the target skin region.
 void updateSkin()
          Do not use thos method with SkinTransferNodes.
 void write(JMEExporter e)
           
 
Methods inherited from class com.jme.animation.SkinNode
addBoneInfluence, addConnectionPoint, addSkin, assignSkeletonBoneInfluences, assignSkeletonBoneInfluences, assimilate, assimilate, assimilate, boneChanged, childChange, cullRegionMappings, deassimilate, getCache, getConnectionPoints, getInfluenceCount, getSkin, getSkins, isExternalControl, normalizeWeights, normalizeWeights, pose, pose, pose, pose, recreateCache, regenInfluenceOffsets, regenInfluenceOffsets, remapInfluences, removeGeometry, removeSkinGeometries, removeSkinGeometry, removeSkinGeometry, revertToBind, setCache, setExternalControl, setSkins, updateGeometricState, validateSkins
 
Methods inherited from class com.jme.scene.Node
applyRenderState, attachChild, attachChildAt, descendantMatches, descendantMatches, descendantMatches, 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 com.jme.scene.Spatial
addController, calculateCollisions, calculateCollisions, calculatePick, calculatePick, clearControllers, clearRenderState, clearRenderState, findCollisions, findPick, getClassTag, getCollisionMask, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, hasCollision, isCollidable, isCollidable, localToWorld, lock, lock, lockBranch, lockMeshes, lookAt, matches, matches, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCollisionMask, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBranch, unlockMeshes, updateRenderState, updateRenderState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal
 
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

skinRegion

protected java.lang.String skinRegion
Constructor Detail

SkinTransferNode

public SkinTransferNode()
Empty Constructor to be used internally only.


SkinTransferNode

public SkinTransferNode(java.lang.String name)
Method Detail

getSkinRegion

public java.lang.String getSkinRegion()

setSkinRegion

public void setSkinRegion(java.lang.String skinRegion)
Sets the target skin region. If set to a non-null value, then when this SkinTransferNode is assimilated, these Geometries will replace all previously loaded Geometries with the same skinRegion.


setParent

protected void setParent(Node parent)
Do not use thos method with SkinTransferNodes.

Overrides:
setParent in class Spatial
Parameters:
parent - the parent of this node.

addBoneInfluence

public void addBoneInfluence(int geomIndex,
                             int vert,
                             Bone bone,
                             float weight)
Do not use thos method with SkinTransferNodes.

Overrides:
addBoneInfluence in class SkinNode
Parameters:
geomIndex - the geometry child that contains the vertex to be affected.
vert - the index to the vertex.
bone - the bone that affects the vertex.
weight - the weight that the bone will affect the vertex.

setAnimation

public void setAnimation(BoneAnimation anim)
Do not use thos method with SkinTransferNodes.

Overrides:
setAnimation in class SkinNode

setAnimation

public void setAnimation(int index)
Do not use thos method with SkinTransferNodes.

Overrides:
setAnimation in class SkinNode

setAnimation

public void setAnimation(java.lang.String name)
Do not use thos method with SkinTransferNodes.

Overrides:
setAnimation in class SkinNode

getAnimationString

public java.lang.String getAnimationString()
Overrides:
getAnimationString in class SkinNode

setSkeleton

public void setSkeleton(Bone b)
Do not use thos method with SkinTransferNodes.

Overrides:
setSkeleton in class SkinNode

getSkeleton

public Bone getSkeleton()
Overrides:
getSkeleton in class SkinNode

assignSkeletonBoneInfluences

public void assignSkeletonBoneInfluences()
Do not use thos method with SkinTransferNodes.

Overrides:
assignSkeletonBoneInfluences in class SkinNode

regenInfluenceOffsets

public void regenInfluenceOffsets()
Do not use thos method with SkinTransferNodes.

Overrides:
regenInfluenceOffsets in class SkinNode

updateSkin

public void updateSkin()
Do not use thos method with SkinTransferNodes.

Overrides:
updateSkin in class SkinNode

setBindMatrix

public void setBindMatrix(Matrix4f mat)
Do not use thos method with SkinTransferNodes.

Overrides:
setBindMatrix in class SkinNode

remapInfluences

public void remapInfluences(VertMap mappings,
                            int geomIndex)
Do not use thos method with SkinTransferNodes.

Overrides:
remapInfluences in class SkinNode

assimilate

protected void assimilate(Geometry newSkinGeo,
                          java.util.ArrayList<BoneInfluence>[] newInfluences)
Do not use thos method with SkinTransferNodes.


write

public void write(JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class SkinNode
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class SkinNode
Throws:
java.io.IOException

setSkinRegion

public void setSkinRegion(Geometry skinGeometry,
                          java.lang.String skinRegion)
Do not use thos method with SkinTransferNodes.

Overrides:
setSkinRegion in class SkinNode
Parameters:
skinGeometry - Should already be a skin geometry of this SkinNode. If it isn't, it will have no effect and no indication will be given. (The entry will get lazily culled in the future).

hasSkinGeometry

public boolean hasSkinGeometry(java.lang.String geoName,
                               java.lang.String matchSkinRegion)
Overrides:
hasSkinGeometry in class SkinNode
matchSkinRegion - null means match any (including no) skin region


Copyright 2003-2009 jMonkeyEngine