org.osm2world.core.target.common
Class AbstractTarget
Object
AbstractTarget
- All Implemented Interfaces:
- Target
- Direct Known Subclasses:
- ObjTarget, POVRayTarget, PrimitiveTarget
public abstract class AbstractTarget
- extends Object
- implements Target
superclass for Target
implementations that defines some
of the required methods using others. Extending it reduces the number of
methods that have to be provided by the implementation
Method Summary |
void |
beginObject(WorldObject object)
announces the begin of the draw* calls for a WorldObject . |
void |
drawBox(Material material,
VectorXYZ frontLowerLeft,
VectorXYZ rightVector,
VectorXYZ upVector,
VectorXYZ backVector)
draws a box with outward-facing polygons |
void |
drawColumn(Material material,
Integer corners,
VectorXYZ base,
double height,
double radiusBottom,
double radiusTop,
boolean drawBottom,
boolean drawTop)
draws a column with outward-facing polygons around a point. |
void |
drawPolygon(Material material,
VectorXYZ... vs)
|
void |
drawTriangleFan(Material material,
List<? extends VectorXYZ> vs)
|
void |
drawTriangleStrip(Material material,
List<? extends VectorXYZ> vs)
|
void |
drawTriangleStrip(Material material,
VectorXYZ... vectors)
|
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTarget
public AbstractTarget()
beginObject
public void beginObject(WorldObject object)
- Description copied from interface:
Target
- announces the begin of the draw* calls for a
WorldObject
.
This allows targets to group them, if desired.
Otherwise, this can be ignored.
- Specified by:
beginObject
in interface Target
drawBox
public void drawBox(Material material,
VectorXYZ frontLowerLeft,
VectorXYZ rightVector,
VectorXYZ upVector,
VectorXYZ backVector)
- Description copied from interface:
Target
- draws a box with outward-facing polygons
- Specified by:
drawBox
in interface Target
drawColumn
public void drawColumn(Material material,
Integer corners,
VectorXYZ base,
double height,
double radiusBottom,
double radiusTop,
boolean drawBottom,
boolean drawTop)
- Description copied from interface:
Target
- draws a column with outward-facing polygons around a point.
A column is a polygon with > 3 corners extruded upwards.
The implementation may decide to reduce the number of corners
in order to improve performance (or make rendering possible
when a perfect cylinder isn't supported).
- Specified by:
drawColumn
in interface Target
corners
- number of corners; null creates a cylinder
for radiusBottom == radiusTop or (truncated) cone otherwise
drawTriangleStrip
public void drawTriangleStrip(Material material,
VectorXYZ... vectors)
- Specified by:
drawTriangleStrip
in interface Target
drawTriangleStrip
public void drawTriangleStrip(Material material,
List<? extends VectorXYZ> vs)
- Specified by:
drawTriangleStrip
in interface Target
drawTriangleFan
public void drawTriangleFan(Material material,
List<? extends VectorXYZ> vs)
- Specified by:
drawTriangleFan
in interface Target
drawPolygon
public void drawPolygon(Material material,
VectorXYZ... vs)
- Specified by:
drawPolygon
in interface Target