es.ucm.look.ar.ar3D.core.drawables
Class Mesh3D

java.lang.Object
  extended by es.ucm.look.ar.ar3D.core.drawables.Mesh3D
All Implemented Interfaces:
Drawable3D
Direct Known Subclasses:
CirclePrimitive, Cube, Grid, LinePrimitive, LinesLoopPrimitive, ObjMesh3D, PointPrimitive, Ring, SquarePrimitive, TrianglePrimitive

public abstract class Mesh3D
extends java.lang.Object
implements Drawable3D

Represents an 3D object that can be drawn.


Constructor Summary
Mesh3D()
          Constructs an entity
 
Method Summary
 void draw(GL10 gl)
          Draw the entity into the GL10 context
 Armature getArmarture()
          Returns an Armature in the local system coordiantes of this entity
 void setNormalBuffer(java.nio.FloatBuffer normalBuffer)
           
 void setVertexBuffer(java.nio.FloatBuffer vertexBuffer)
           
 void update(long elapsed)
          Updates entity for the elapsed time
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mesh3D

public Mesh3D()
Constructs an entity

Parameters:
id - Entity id
Method Detail

draw

public void draw(GL10 gl)
Draw the entity into the GL10 context

Specified by:
draw in interface Drawable3D
Parameters:
gl - GL10 context

getArmarture

public Armature getArmarture()
Returns an Armature in the local system coordiantes of this entity

Returns:
an Armature in the local system coordiantes of this entity

setNormalBuffer

public void setNormalBuffer(java.nio.FloatBuffer normalBuffer)

setVertexBuffer

public void setVertexBuffer(java.nio.FloatBuffer vertexBuffer)

update

public void update(long elapsed)
Updates entity for the elapsed time

Specified by:
update in interface Drawable3D
Parameters:
elapsed - elapsed time since last update