|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mascotcapsule.micro3d.v3.Figure
This class maintains the 3D model data. It loads meta model data and maintains polygon data. The pose of the model can be changed by using the ActionTable object. The initial state of the pose is composed by the 3D coordinates in the meta data.
Constructor Summary | |
Figure(byte[] b)
Creates a model object from the meta model data. |
|
Figure(java.lang.String name)
Creates a model object from the meta data specified by the resource name. |
Method Summary | |
void |
dispose()
Disposes of model data being maintained. |
int |
getNumPattern()
Gets the number of model external appearances. |
int |
getNumTextures()
Gets the setting for the number of textures. |
Texture |
getTexture()
Gets the texture data set for the 3D model. |
void |
selectTexture(int idx)
Sets one of the texture data sets for this object as the 3D model texture data. |
void |
setPattern(int idx)
Enters the number of model external appearances. |
void |
setPosture(ActionTable act,
int action,
int frame)
Enters a pose setting for the 3D model. |
void |
setTexture(Texture t)
Enters texture data settings for the 3D model. |
void |
setTexture(Texture[] t)
Enters the reference setting for the texture data set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Figure(byte[] b)
b
- Data byte column
java.lang.NullPointerException
- When argument is null.
java.lang.RuntimeException
- Generated when object creation fails, such as from false data.public Figure(java.lang.String name) throws java.io.IOException
name
- Resourece name
java.lang.NullPointerException
- When argument name is null.
java.lang.RuntimeException
- Object creation failure, such as from false data.
java.io.IOException
- I/O error when reading data.Method Detail |
public final void dispose()
public final void setPosture(ActionTable act, int action, int frame)
act
- Action dataaction
- Action index numberframe
- Action frame value
java.lang.NullPointerException
- When argument act is null.
java.lang.IllegalArgumentException
- When argument action is false.public final Texture getTexture()
public final void setTexture(Texture t)
t
- Texture object
java.lang.NullPointerException
- When argument is null.
java.lang.IllegalArgumentException
- When the texture data is not for the model (but for environment mapping)public final void setTexture(Texture[] t)
t
- Texture object array
java.lang.NullPointerException
- When either the argument is null or one of the elements is null.
java.lang.IllegalArgumentException
- When some of the textures are not for
the model(but for environment mapping)public final int getNumTextures()
public final void selectTexture(int idx)
idx
- Index value
java.lang.IllegalArgumentException
- When argument idx is false.public final int getNumPattern()
public final void setPattern(int idx)
Examples: External state0: Face with common set External state1: Closed right eye External state2: Open right eye External state3: Closed left eye External state4: Open left eye External state5: Closed mouth External state6: Open mouth When there is a model with the external appearance states shown above: setPattern(0) ?¨ Face with neither eyes nor mouth setPattern(1<<0) ?¨ Face with closed right eye setPattern(1<<1) ?¨ Face with open right eye setPattern(1<<2) ?¨ Face with closed left eye setPattern(1<<3) ?¨ Face with open left eye setPattern((1<<1)|(1<<3)|(1<<5)) ?¨ Face with both eyes and mouth open setPattern((1<<0)|(1<<1)) ?¨ Face with both closed right eye and open right eye
idx
- State of model external appearance
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |