|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectAbstractTarget<R>
PrimitiveTarget<RenderableToPrimitiveBuffer>
PrimitiveBuffer
public class PrimitiveBuffer
Storage for low-level rendering information (vertex and primitive data) that can be displayed using graphics APIs, e.g. OpenGL. Higher-level information, such as object coherence, OSM attributes or representations, isn't present in an OGLBuffer.
Constructor Summary | |
---|---|
PrimitiveBuffer()
|
Method Summary | |
---|---|
protected void |
drawPrimitive(Primitive.Type type,
Material material,
List<? extends VectorXYZ> vertices,
VectorXYZ[] normals)
|
Set<Material> |
getMaterials()
returns all materials used in the buffer |
Collection<Primitive> |
getPrimitives(Material material)
returns all primitives that use a given material |
Class<RenderableToPrimitiveBuffer> |
getRenderableType()
returns the renderable type designed for this target |
VectorXYZ |
getVertex(int index)
|
List<VectorXYZ> |
getVertices()
returns all vertices, in a list where the indices correspond to those used by getVertex(int) |
void |
optimize()
optimizes the primitives, for example by merging them into larger primitives. |
void |
render(RenderableToPrimitiveBuffer renderable)
renders a renderable object to this target. |
Methods inherited from class PrimitiveTarget |
---|
drawPolygon, drawPolygon, drawTriangleFan, drawTriangles, drawTriangleStrip, drawTriangleStrip, drawTrianglesWithNormals |
Methods inherited from class AbstractTarget |
---|
beginObject, drawBox, drawColumn |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrimitiveBuffer()
Method Detail |
---|
public Class<RenderableToPrimitiveBuffer> getRenderableType()
Target
public void render(RenderableToPrimitiveBuffer renderable)
Target
protected void drawPrimitive(Primitive.Type type, Material material, List<? extends VectorXYZ> vertices, VectorXYZ[] normals)
drawPrimitive
in class PrimitiveTarget<RenderableToPrimitiveBuffer>
vertices
- vertices that form the primitivenormals
- normal vector for each vertex; same size as vspublic void optimize()
public VectorXYZ getVertex(int index)
public List<VectorXYZ> getVertices()
getVertex(int)
public Set<Material> getMaterials()
public Collection<Primitive> getPrimitives(Material material)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |