org.cogchar.render.model.humanoid
Class HumanoidFigure

java.lang.Object
  extended by org.appdapter.core.log.BasicDebugger
      extended by org.cogchar.render.model.humanoid.HumanoidFigure
All Implemented Interfaces:
com.jme3.animation.AnimEventListener, com.jme3.bullet.collision.RagdollCollisionListener, org.appdapter.core.log.Loggable
Direct Known Subclasses:
HumanoidFigure_SinbadTest, PhysicallyWigglingHumanoid

public class HumanoidFigure
extends org.appdapter.core.log.BasicDebugger
implements com.jme3.bullet.collision.RagdollCollisionListener, com.jme3.animation.AnimEventListener

Primary state object for organizing the depiction of a mesh+skeleton in JME3. The "Humanoid" part is not essential to the current implementation.

Author:
Stu B.

Field Summary
static String SKEL_DEBUG_NAME
           
 
Fields inherited from class org.appdapter.core.log.BasicDebugger
myLogger
 
Fields inherited from interface org.appdapter.core.log.Loggable
IMPO_HI, IMPO_HIHI, IMPO_LO, IMPO_LOLO, IMPO_MAX, IMPO_MIN, IMPO_NORM
 
Constructor Summary
HumanoidFigure(HumanoidFigureConfig hfc)
           
 
Method Summary
 void applyFigureState_onSceneThread(FigureState fs)
           
protected  void attachRagdollBone(FigureBoneDesc hbd)
           
 void attachRagdollBones()
           
protected  void becomeFloppyRagdoll()
           
protected  void becomeKinematicPuppet()
           
 void collide(com.jme3.animation.Bone bone, com.jme3.bullet.collision.PhysicsCollisionObject pco, com.jme3.bullet.collision.PhysicsCollisionEvent pce)
           
 void detachFromVirtualWorld(com.jme3.scene.Node parentNode, com.jme3.bullet.PhysicsSpace ps)
           
 com.jme3.scene.Node getBoneAttachmentsNode(String boneName)
           
protected  org.appdapter.core.name.Ident getCharIdent()
           
protected  com.jme3.animation.AnimChannel getFigureAnimChannel()
           
protected  com.jme3.animation.Bone getFigureBone(String boneName)
           
protected  HumanoidFigureConfig getFigureConfig()
           
protected  com.jme3.scene.Node getFigureNode()
           
protected  com.jme3.animation.Bone getFigureRootBone()
           
 FigureState getFigureState()
           
protected  FigureBoneConfig getHBConfig()
           
 HumanoidFigureModule getModule()
           
protected  String getNickname()
           
 com.jme3.scene.Node getNode()
           
protected  HumanoidRagdollControl getRagdollControl()
           
 void initDebugSkeleton(com.jme3.asset.AssetManager assetMgr)
           
 boolean loadMeshAndSkeletonIntoVWorld(com.jme3.asset.AssetManager assetMgr, com.jme3.scene.Node parentNode, com.jme3.bullet.PhysicsSpace ps)
           
protected  void movePosition_onSceneThread(float deltaX, float deltaY, float deltaZ)
           
protected  void moveToPosition_onSceneThread(com.jme3.math.Vector3f pos)
           
 void onAnimChange(com.jme3.animation.AnimControl control, com.jme3.animation.AnimChannel channel, String animName)
           
 void onAnimCycleDone(com.jme3.animation.AnimControl control, com.jme3.animation.AnimChannel channel, String animName)
           
 void setFigureState(FigureState fs)
           
 void setModule(HumanoidFigureModule module)
           
 void toggleDebugSkeleton_onSceneThread()
           
 
Methods inherited from class org.appdapter.core.log.BasicDebugger
checkDebugImportance, forceLog4jConfig, getLogger, getLoggerForClass, isLoggerUsable, logDebug, logError, logError, logInfo, logInfo, logInfoEvent, logWarning, logWarning, logWithException, setDebugImportanceThreshold, setLogger, useLoggerForClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SKEL_DEBUG_NAME

public static String SKEL_DEBUG_NAME
Constructor Detail

HumanoidFigure

public HumanoidFigure(HumanoidFigureConfig hfc)
Method Detail

getFigureNode

protected com.jme3.scene.Node getFigureNode()

getFigureConfig

protected HumanoidFigureConfig getFigureConfig()

getFigureAnimChannel

protected com.jme3.animation.AnimChannel getFigureAnimChannel()

getRagdollControl

protected HumanoidRagdollControl getRagdollControl()

getCharIdent

protected org.appdapter.core.name.Ident getCharIdent()

getNickname

protected String getNickname()

getHBConfig

protected FigureBoneConfig getHBConfig()

getFigureBone

protected com.jme3.animation.Bone getFigureBone(String boneName)

getFigureRootBone

protected com.jme3.animation.Bone getFigureRootBone()

getModule

public HumanoidFigureModule getModule()

setModule

public void setModule(HumanoidFigureModule module)

loadMeshAndSkeletonIntoVWorld

public boolean loadMeshAndSkeletonIntoVWorld(com.jme3.asset.AssetManager assetMgr,
                                             com.jme3.scene.Node parentNode,
                                             com.jme3.bullet.PhysicsSpace ps)

detachFromVirtualWorld

public void detachFromVirtualWorld(com.jme3.scene.Node parentNode,
                                   com.jme3.bullet.PhysicsSpace ps)

becomeKinematicPuppet

protected void becomeKinematicPuppet()

becomeFloppyRagdoll

protected void becomeFloppyRagdoll()

moveToPosition_onSceneThread

protected void moveToPosition_onSceneThread(com.jme3.math.Vector3f pos)

movePosition_onSceneThread

protected void movePosition_onSceneThread(float deltaX,
                                          float deltaY,
                                          float deltaZ)

getNode

public com.jme3.scene.Node getNode()

collide

public void collide(com.jme3.animation.Bone bone,
                    com.jme3.bullet.collision.PhysicsCollisionObject pco,
                    com.jme3.bullet.collision.PhysicsCollisionEvent pce)
Specified by:
collide in interface com.jme3.bullet.collision.RagdollCollisionListener

onAnimCycleDone

public void onAnimCycleDone(com.jme3.animation.AnimControl control,
                            com.jme3.animation.AnimChannel channel,
                            String animName)
Specified by:
onAnimCycleDone in interface com.jme3.animation.AnimEventListener

onAnimChange

public void onAnimChange(com.jme3.animation.AnimControl control,
                         com.jme3.animation.AnimChannel channel,
                         String animName)
Specified by:
onAnimChange in interface com.jme3.animation.AnimEventListener

initDebugSkeleton

public void initDebugSkeleton(com.jme3.asset.AssetManager assetMgr)

toggleDebugSkeleton_onSceneThread

public void toggleDebugSkeleton_onSceneThread()

attachRagdollBone

protected void attachRagdollBone(FigureBoneDesc hbd)

getFigureState

public FigureState getFigureState()

setFigureState

public void setFigureState(FigureState fs)

applyFigureState_onSceneThread

public void applyFigureState_onSceneThread(FigureState fs)

attachRagdollBones

public void attachRagdollBones()

getBoneAttachmentsNode

public com.jme3.scene.Node getBoneAttachmentsNode(String boneName)


Copyright © 2010-2014. All Rights Reserved.