Class Mesh
java.lang.Object
com.codename1.gpu.Mesh
Renderable geometry: a
VertexBuffer, an optional IndexBuffer and the
PrimitiveType that ties the vertices into shapes. A mesh carries no
material; the same mesh can be drawn with different materials through
GraphicsDevice.draw(Mesh, Material, float[]).-
Constructor Summary
ConstructorsConstructorDescriptionMesh(VertexBuffer vertices, IndexBuffer indices, PrimitiveType primitiveType) Creates an indexed mesh.Mesh(VertexBuffer vertices, PrimitiveType primitiveType) Creates a non indexed mesh. -
Method Summary
Modifier and TypeMethodDescriptionReturns the index buffer, or null for a non indexed mesh.Returns the primitive assembly type.Returns the vertex buffer.booleanReturns true if this mesh is drawn with an index buffer.
-
Constructor Details
-
Mesh
Creates a non indexed mesh.
Parameters
-
vertices: the vertex data -
primitiveType: how the vertices are assembled into primitives
-
-
Mesh
Creates an indexed mesh.
Parameters
-
vertices: the vertex data -
indices: the element indices, or null for a non indexed mesh -
primitiveType: how the vertices are assembled into primitives
-
-
-
Method Details
-
getVertices
Returns the vertex buffer. -
getIndices
Returns the index buffer, or null for a non indexed mesh. -
isIndexed
public boolean isIndexed()Returns true if this mesh is drawn with an index buffer. -
getPrimitiveType
Returns the primitive assembly type.
-