org.osm2world.core.target.common
public abstract class PrimitiveTarget<R extends Renderable> extends AbstractTarget<R>
BOX_TEX_COORDS_1, BOX_TEX_COORDS_2, config
Constructor and Description |
---|
PrimitiveTarget() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
drawPrimitive(Primitive.Type type,
Material material,
List<VectorXYZ> vs,
List<VectorXYZ> normals,
List<List<VectorXZ>> texCoordLists) |
void |
drawTriangleFan(Material material,
List<VectorXYZ> vs,
List<List<VectorXZ>> texCoordLists)
draws a triangle fan.
|
void |
drawTriangles(Material material,
Collection<? extends TriangleXYZ> triangles,
List<List<VectorXZ>> texCoordLists)
draws triangles.
|
void |
drawTriangleStrip(Material material,
List<VectorXYZ> vs,
List<List<VectorXZ>> texCoordLists)
draws a triangle strip.
|
void |
drawTrianglesWithNormals(Material material,
Collection<? extends TriangleXYZWithNormals> triangles,
List<List<VectorXZ>> texCoordLists)
draws triangles with explicitly defined normal vectors.
|
beginObject, drawBox, drawColumn, drawConvexPolygon, drawExtrudedShape, drawShape, finish, setConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRenderableType, render
protected abstract void drawPrimitive(Primitive.Type type, Material material, List<VectorXYZ> vs, List<VectorXYZ> normals, List<List<VectorXZ>> texCoordLists)
vs
- vertices that form the primitivenormals
- normal vector for each vertex; same size as vstexCoordLists
- texture coordinates for each texture layer,
each list has the same size as vspublic void drawTriangleStrip(Material material, List<VectorXYZ> vs, List<List<VectorXZ>> texCoordLists)
Target
drawTriangleStrip
in interface Target<R extends Renderable>
drawTriangleStrip
in class AbstractTarget<R extends Renderable>
vs
- vertices of the triangle striptexCoordLists
- one texture coordinate list per texture.
Each must have the same length as the "vs" parameter.
Can be null if no texturing information is available.public void drawTriangleFan(Material material, List<VectorXYZ> vs, List<List<VectorXZ>> texCoordLists)
Target
drawTriangleFan
in interface Target<R extends Renderable>
drawTriangleFan
in class AbstractTarget<R extends Renderable>
Target.drawTriangleStrip(Material, List, List)
public void drawTriangles(Material material, Collection<? extends TriangleXYZ> triangles, List<List<VectorXZ>> texCoordLists)
Target
texCoordLists
- one texture coordinate list per texture.
Each must have three coordinates per triangle.
Can be null if no texturing information is available.public void drawTrianglesWithNormals(Material material, Collection<? extends TriangleXYZWithNormals> triangles, List<List<VectorXZ>> texCoordLists)
Target