|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.graphics.opengl.GLBasicMesh
public class GLBasicMesh
A GLBasicMesh ...
| Field Summary | |
|---|---|
private ArrayList<GLVertexAttribute> |
attributeList
|
(package private) int |
geometryType
|
private String |
id
|
private IntBuffer |
indexBuffer
|
private int |
indexBufferId
|
private boolean |
indexBufferModified
|
private int |
indexByteBufferSize
|
private int |
nrOfIndices
|
protected int |
nrOfVertices
|
private int |
vertexBufferId
|
| Constructor Summary | |
|---|---|
GLBasicMesh()
Creates a new GLBasicMesh. |
|
| Method Summary | |
|---|---|
int |
addGLVertexAttribute(VertexAttribute va)
Adds a new vertex attribute, and returns its index number. |
void |
bindShaderProg(GLRenderContext gl,
int prog)
Binds the attribute indices, and defines the OGL Array Buffer for the specified OGL Shader program |
String |
getId()
|
float[] |
getVertexData(int attrNum,
float[] vertexData)
Fills and returns the vertexData float array with the current contents of the vertex data for the specified attribute. |
void |
glInit(GLRenderContext gl)
initializes the OpenGL ARRAY and ELEMENT_ARRAY buffers. |
void |
glRender(GLRenderContext gl)
renders the mesh, using the vertexBuffer data. |
void |
setGeometryType(int type)
sets the type of geometry, like GLC.GL_TRIANGLE_STRIP, or GLC.GL_TRIANGLES. |
void |
setId(String id)
|
void |
setIndexData(int[] indexData)
Allocates and sets the index buffer, defining the mesh topology, by copying the data from indexData to an internal index buffer. |
private void |
setNrOfVertices(int nvert)
|
void |
setVertexData(int attrNum,
float[] vertexData)
Sets the vertex data for an attribute, identified by its index number The data will be copied. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private IntBuffer indexBuffer
private int nrOfIndices
private int indexByteBufferSize
private boolean indexBufferModified
protected int nrOfVertices
private ArrayList<GLVertexAttribute> attributeList
private int vertexBufferId
private int indexBufferId
int geometryType
private String id
| Constructor Detail |
|---|
public GLBasicMesh()
| Method Detail |
|---|
public void setId(String id)
public String getId()
public void setGeometryType(int type)
public void setIndexData(int[] indexData)
private void setNrOfVertices(int nvert)
public int addGLVertexAttribute(VertexAttribute va)
public void setVertexData(int attrNum,
float[] vertexData)
public float[] getVertexData(int attrNum,
float[] vertexData)
public void glInit(GLRenderContext gl)
glInit in interface GLRenderObject
public void bindShaderProg(GLRenderContext gl,
int prog)
public void glRender(GLRenderContext gl)
glRender in interface GLRenderObjectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||