|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjarp.Character
public class Character
The main avatar definition class: this maintains definitions of both the static and the dynamic aspects of the avatar's skeleton and surface mesh, and provides methods to support rendering of the avatar in its current configuration.
Field Summary | |
---|---|
static int |
EYEL_4CC
|
static int |
EYER_4CC
|
static int |
HEAD_4CC
|
static Quaternion |
QUAT_Z_MINUS_PI_BY_2
Quaternion [with components (w,x,y,z)] for a rotation by -PI/2 round the Z-axis. |
static boolean |
USE_EMBEDDED_TEXTURE
|
static boolean |
V21_IS_VJJ_FORMAT
|
Constructor Summary | |
---|---|
Character(java.lang.String avurl,
JAInputStream jins,
java.lang.String rqstversion,
javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
JAOptions jopts)
Constructs this Character using avatar definition data from the given stream. |
|
Character(java.lang.String avurl,
JAOptions jopts)
Minimal constructor, without specific avatar definition data. |
Method Summary | |
---|---|
void |
buildSkin()
Computes the new mesh data for the current skeleton and morphs, and passes the result to GL for rendering. |
void |
draw(javax.media.opengl.GL gl)
Draws this character, using the given GL interface. |
void |
drawNormalsColour(javax.media.opengl.GL gl)
Draws the normals colour for this character, using the given GL interface. |
void |
generateFrame()
Generates the mesh-rendering data for the current frame. |
void |
generateFrame(float camX,
float camY,
float camZ)
Update mesh-data (vertex coordinates and normals) based on latest skeleton and morph data. |
Bone |
getBone(int id)
Returns the bone with the given ID. |
int |
getMeshCount()
Returns the number of meshes for this character. |
java.lang.String |
getVersion()
Returns the version number string for this character. |
void |
save(JAOutputStream jouts)
Writes this Character to the given stream in V2.2 format. |
void |
saveTextureFile()
Saves this avatar's texture image to a file. |
void |
setFrame(CASFrame frame)
Sets a new frame (pose) for this character. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean USE_EMBEDDED_TEXTURE
public static int HEAD_4CC
public static int EYER_4CC
public static int EYEL_4CC
public static boolean V21_IS_VJJ_FORMAT
public static final Quaternion QUAT_Z_MINUS_PI_BY_2
Constructor Detail |
---|
public Character(java.lang.String avurl, JAOptions jopts)
public Character(java.lang.String avurl, JAInputStream jins, java.lang.String rqstversion, javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, JAOptions jopts) throws java.io.IOException, JAException
java.io.IOException
JAException
Method Detail |
---|
public java.lang.String getVersion()
public int getMeshCount()
public Bone getBone(int id)
public void setFrame(CASFrame frame)
public void save(JAOutputStream jouts) throws java.io.IOException
NB
W.e.f. 2007-04 we save only in v2.2 avatar definition format,
i.e. the current format.
java.io.IOException
public void saveTextureFile() throws java.io.IOException
java.io.IOException
public void drawNormalsColour(javax.media.opengl.GL gl)
public void draw(javax.media.opengl.GL gl)
public void generateFrame() throws JAException
JAException
public void generateFrame(float camX, float camY, float camZ) throws JAException
JAException
public void buildSkin() throws JAException
JAException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |