public class

Mesh

extends Shape
java.lang.Object
   ↳ org.andengine.entity.Entity
     ↳ org.andengine.entity.shape.Shape
       ↳ org.andengine.entity.primitive.Mesh

Class Overview

(c) Zynga 2012

Summary

Nested Classes
enum Mesh.DrawMode  
class Mesh.HighPerformanceMeshVertexBufferObject  
interface Mesh.IMeshVertexBufferObject  
Constants
int COLOR_INDEX
int VERTEX_INDEX_X
int VERTEX_INDEX_Y
int VERTEX_SIZE
[Expand]
Inherited Constants
From interface org.andengine.entity.shape.IShape
Fields
public static final VertexBufferObjectAttributes VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT
protected final Mesh.IMeshVertexBufferObject mMeshVertexBufferObject
[Expand]
Inherited Fields
From class org.andengine.entity.shape.Shape
From class org.andengine.entity.Entity
Public Constructors
Mesh(float pX, float pY, float[] pBufferData, int pVertexCount, Mesh.DrawMode pDrawMode, VertexBufferObjectManager pVertexBufferObjectManager)
Mesh(float pX, float pY, float[] pBufferData, int pVertexCount, Mesh.DrawMode pDrawMode, VertexBufferObjectManager pVertexBufferObjectManager, VertexBufferObject.DrawType pDrawType)
Mesh(float pX, float pY, int pVertexCount, Mesh.DrawMode pDrawMode, Mesh.IMeshVertexBufferObject pMeshVertexBufferObject)
Public Methods
boolean collidesWith(IShape pOtherShape)
boolean contains(float pX, float pY)
float[] getBufferData()
Mesh.IMeshVertexBufferObject getVertexBufferObject()
void setDrawMode(Mesh.DrawMode pDrawMode)
void setVertexCountToDraw(int pVertexCountToDraw)
Protected Methods
void draw(GLState pGLState, Camera pCamera)
void onUpdateColor()
void onUpdateVertices()
void postDraw(GLState pGLState, Camera pCamera)
void preDraw(GLState pGLState, Camera pCamera)
[Expand]
Inherited Methods
From class org.andengine.entity.shape.Shape
From class org.andengine.entity.Entity
From class java.lang.Object
From interface org.andengine.engine.handler.IDrawHandler
From interface org.andengine.engine.handler.IUpdateHandler
From interface org.andengine.entity.IEntity
From interface org.andengine.entity.scene.Scene.ITouchArea
From interface org.andengine.entity.shape.IShape
From interface org.andengine.util.IDisposable

Constants

public static final int COLOR_INDEX

Constant Value: 2 (0x00000002)

public static final int VERTEX_INDEX_X

Constant Value: 0 (0x00000000)

public static final int VERTEX_INDEX_Y

Constant Value: 1 (0x00000001)

public static final int VERTEX_SIZE

Constant Value: 3 (0x00000003)

Fields

public static final VertexBufferObjectAttributes VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT

protected final Mesh.IMeshVertexBufferObject mMeshVertexBufferObject

Public Constructors

public Mesh (float pX, float pY, float[] pBufferData, int pVertexCount, Mesh.DrawMode pDrawMode, VertexBufferObjectManager pVertexBufferObjectManager)

public Mesh (float pX, float pY, float[] pBufferData, int pVertexCount, Mesh.DrawMode pDrawMode, VertexBufferObjectManager pVertexBufferObjectManager, VertexBufferObject.DrawType pDrawType)

public Mesh (float pX, float pY, int pVertexCount, Mesh.DrawMode pDrawMode, Mesh.IMeshVertexBufferObject pMeshVertexBufferObject)

Public Methods

public boolean collidesWith (IShape pOtherShape)

public boolean contains (float pX, float pY)

public float[] getBufferData ()

public Mesh.IMeshVertexBufferObject getVertexBufferObject ()

public void setDrawMode (Mesh.DrawMode pDrawMode)

public void setVertexCountToDraw (int pVertexCountToDraw)

Protected Methods

protected void draw (GLState pGLState, Camera pCamera)

Parameters
pGLState the currently active GLState i.e. to apply transformations to.
pCamera the currently active Camera i.e. to be used for culling.

protected void onUpdateColor ()

protected void onUpdateVertices ()

protected void postDraw (GLState pGLState, Camera pCamera)

Parameters
pGLState the currently active GLState i.e. to apply transformations to.
pCamera the currently active Camera i.e. to be used for culling.

protected void preDraw (GLState pGLState, Camera pCamera)

Parameters
pGLState the currently active GLState i.e. to apply transformations to.
pCamera the currently active Camera i.e. to be used for culling.