Animating a Joint

The next step is to associate a humanoid joint in a VRML file with the java control and have it handle all the interaction between java and VRML. The class DualJoint3D takes the name of the joint as one of its parameters without the hanim_ and the l_ or r_ prefix and creates a dual control for the two joints involved. It handles translating the manipulation of the controls to the movement of limbs in the VRML viewer without any intervention from the main program.

This is a demo applet showing the manipulation of a joint in a VRML scene using an instance of the SingleJoint java class. This class is a simpler, single version of the DualJoint3D class.


Resolving the two positions from the 2DOF control and the twist from the 1DOF control into a single rotation sent to the VRML scene is handled by the DualJoint3D class. This is done using quaternions to represent each rotation and deriving a single rotation from them.

 

HomePreviousNextFeedback