|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.geometry.AbstractMesh
de.rico.engine.geometry.MeshVA
public class MeshVA
This class represents a mesh. The mesh uses the vertex array technology.
Constructor Summary | |
---|---|
MeshVA(boolean smooth)
Creates a new mesh object, optionally smooth shaded. |
|
MeshVA(boolean smooth,
BoundingVolume type)
Creates a new mesh object, optionally smooth shaded. |
Method Summary | |
---|---|
void |
addAnimation(Animation anim)
Adds an animation object to the mesh. |
void |
addFaces(int index,
Triangle[] faces)
Adds a set of faces (array of triangles) to the vertex array mesh |
void |
destroy()
Destroys the mesh. |
void |
draw(javax.media.opengl.GL gl)
Call this method to draw the mesh. |
void |
finishModel()
This method finishes important remaining work to finish the construction of the model. |
Animation |
getAnimation(java.lang.String name)
Returns the animation that corresponds to the specied name. |
java.util.List<Animation> |
getAnimations()
Returns a list of all animations of the mesh |
Animation |
getCurrentAnimation()
Return the animation object for the current animation. |
java.util.List<Triangle> |
getFaces()
Returns the faces of the currently indexed vertex array |
java.util.List<Triangle> |
getFacesTransformed()
Returns the face with coordinates that are correctly transformed (translation, rotation, scale factor) according to the current transformation state of the mesh. |
int |
getTotalFrameCount()
Returns the number of frames of the mesh. |
void |
removeAnimation(Animation anim)
Removes an animation from the mesh. |
void |
setAnimation(java.lang.String name)
Sets the current animation to the one that corresponds to the specified name. |
void |
specializedDraw(javax.media.opengl.GL gl)
Helper method to extract the specialised things just fitting to drawing of vertex arrays. |
void |
update(long elapsedTime)
Updates the mesh. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeshVA(boolean smooth)
smooth
- shade mesh smoothly? --> true=yes, false=nopublic MeshVA(boolean smooth, BoundingVolume type)
smooth
- shade mesh smoothly? --> true=yes, false=notype
- value from the BoundingVolume enumerationMethod Detail |
---|
public void addFaces(int index, Triangle[] faces)
index
- number of the framefaces
- frame (array of triangles)public java.util.List<Triangle> getFaces()
getFaces
in class AbstractMesh
public java.util.List<Triangle> getFacesTransformed()
AbstractMesh
getFacesTransformed
in class AbstractMesh
public void finishModel()
public void addAnimation(Animation anim)
anim
- animation object to addpublic void setAnimation(java.lang.String name)
name
- name of the animation to setpublic Animation getAnimation(java.lang.String name)
name
- name of the animation to find
public java.util.List<Animation> getAnimations()
public Animation getCurrentAnimation()
public void removeAnimation(Animation anim)
anim
- animation to removepublic int getTotalFrameCount()
public void destroy()
AbstractMesh
destroy
in class AbstractMesh
public void update(long elapsedTime)
AbstractMesh
update
in class AbstractMesh
elapsedTime
- time between two framespublic void draw(javax.media.opengl.GL gl)
AbstractMesh
draw
in class AbstractMesh
public void specializedDraw(javax.media.opengl.GL gl)
specializedDraw
in class AbstractMesh
gl
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |