hmi.graphics.util
Class SegmentedDaeHumanoidLoader
java.lang.Object
hmi.graphics.util.SegmentedDaeHumanoidLoader
- All Implemented Interfaces:
- DaeHumanoidLoader
public final class SegmentedDaeHumanoidLoader
- extends Object
- implements DaeHumanoidLoader
Helper class to load a seamless humanoid from a dae file. Useful when a fullfledged ElckerlycDemoEnvironment is not needed.
On request, after loading, the "null pose" for the humanoid is the H-Anim null pose.
Assumption about the collada file:
- the mesh for the segments is directly inside the skeleton joint structure
- after applying the joint renaming file, the animation root joint is called HumanoidRoot
-
- Author:
- Herwin van Welbergen, Dennis Reidsma
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
avatarAnimationRootJoint
private VJoint avatarAnimationRootJoint
avatarRenderNode
private VGLNode avatarRenderNode
avatarRenderRootJoint
private VJoint avatarRenderRootJoint
glScene
private GLScene glScene
gnode
private GNode gnode
SegmentedDaeHumanoidLoader
private SegmentedDaeHumanoidLoader()
SegmentedDaeHumanoidLoader
public SegmentedDaeHumanoidLoader(String id,
Resources resources,
String daeFile,
String colladaRenamingFile,
float colladaScalingFactor,
String colladaIncludeDir,
boolean setToHAnim)
throws IOException
- Throws:
IOException
getAvatarAnimationRootJoint
public VJoint getAvatarAnimationRootJoint()
- Specified by:
getAvatarAnimationRootJoint in interface DaeHumanoidLoader
- Returns:
- the avatarAnimationRootJoint
getAvatarRenderNode
public VGLNode getAvatarRenderNode()
- Specified by:
getAvatarRenderNode in interface DaeHumanoidLoader
- Returns:
- the avatarRenderNode
getAvatarRenderRootJoint
public VJoint getAvatarRenderRootJoint()
- Specified by:
getAvatarRenderRootJoint in interface DaeHumanoidLoader
- Returns:
- the avatarRenderRootJoint
getGLScene
public GLScene getGLScene()
- Specified by:
getGLScene in interface DaeHumanoidLoader
- Returns:
- the GLScene
getGnode
public GNode getGnode()
alignJoint
private void alignJoint(String jointName,
String nextJoint,
float[] dir)
deformMesh
private void deformMesh(String name,
GNode node,
float[] q)
rotateVJoint
private void rotateVJoint(VJoint v,
float[] q)
transJoint
private void transJoint(VJoint v,
float[] vPrev)
findNode
private GNode findNode(GNode start,
String name)
rotateMeshInNodes
private void rotateMeshInNodes(GNode startNode,
float[] q)