public class MrMesh extends MrComponent
Modifier and Type | Class and Description |
---|---|
protected static class |
MrMesh.Data |
protected class |
MrMesh.Render |
MrComponent.View
Modifier and Type | Field and Description |
---|---|
static int |
DRAWTYPE_LINES
Draws the mesh's faces as lines
|
static int |
DRAWTYPE_TRIANGLES
Draws the mesh's faces using triangles
|
mBound, mInitialized, mRenderingContext, TYPE_MESH, TYPE_SHADERPROGRAM, TYPE_TEXTURE
Constructor and Description |
---|
MrMesh(java.lang.String name,
int count,
int drawType,
java.util.Map<java.lang.Integer,MrBufferKey> keys,
MrBuffer vertexBuffer,
MrBuffer indexBuffer)
Creates a new mesh
|
Modifier and Type | Method and Description |
---|---|
void |
bind()
Binds the component
|
void |
draw()
Draws the mesh
|
java.util.Map<java.lang.Integer,MrBufferKey> |
getBufferKeys()
Gets all buffer-keys defined in this mesh
|
int |
getCount()
Gets the number of faces of this mesh
|
MrMesh.Data |
getData()
Gets the data layer linked to this object
|
int |
getDrawType()
Gets the current draw type for this mesh
|
MrBuffer |
getIndexBuffer()
Gets the IBO linked to this mesh
|
java.lang.String |
getName()
Gets the name of this component
|
java.lang.String |
getType()
Gets the type of this component
|
MrBuffer |
getVertexBuffer()
Gets the VBO linked to this mesh
|
MrComponent.View |
getView()
Gets the rendering layer linked to this object
|
initialize, isBound, isInitialized, unbind
public static final int DRAWTYPE_LINES
public static final int DRAWTYPE_TRIANGLES
public MrMesh(java.lang.String name, int count, int drawType, java.util.Map<java.lang.Integer,MrBufferKey> keys, MrBuffer vertexBuffer, MrBuffer indexBuffer)
name
- Name of the meshcount
- Number of facesdrawType
- Used drawtypekeys
- Buffer keys of this meshvertexBuffer
- Vertex data as a bufferindexBuffer
- Vertex indices data as a bufferpublic java.lang.String getType()
MrComponent
getType
in class MrComponent
public java.lang.String getName()
MrComponent
getName
in class MrComponent
public MrMesh.Data getData()
MrComponent
getData
in class MrComponent
public MrComponent.View getView()
MrComponent
getView
in class MrComponent
public void bind()
MrComponent
bind
in class MrComponent
public MrBuffer getIndexBuffer()
public java.util.Map<java.lang.Integer,MrBufferKey> getBufferKeys()
public int getCount()
public MrBuffer getVertexBuffer()
public int getDrawType()
public void draw()