org.osm2world.core.target.povray
Class POVRayTarget

Object
  extended by AbstractTarget<RenderableToPOVRay>
      extended by POVRayTarget
All Implemented Interfaces:
Target<RenderableToPOVRay>

public class POVRayTarget
extends AbstractTarget<RenderableToPOVRay>


Constructor Summary
POVRayTarget(PrintStream output)
           
 
Method Summary
 void append(double value)
           
 void append(int value)
           
 void append(String code)
          provides direct write access to the generated source code.
 void appendMaterial(Material material)
           
 void appendPolygon(VectorXYZ... vs)
           
 void appendPrism(float y1, float y2, VectorXZ... vs)
           
 void appendRGBColor(Color color)
          adds a color.
 void appendTriangle(VectorXYZ a, VectorXYZ b, VectorXYZ c)
           
 void appendTriangle(VectorXYZ a, VectorXYZ b, VectorXYZ c, VectorXYZ na, VectorXYZ nb, VectorXYZ nc, boolean smooth)
           
 void appendVector(double x, double z)
          adds a vector to the String built by a StringBuilder.
 void appendVector(double x, double y, double z)
           
 void appendVector(float x, float y, float z)
          adds a vector to the String built by a StringBuilder.
 void appendVector(VectorXYZ vector)
          alternative to appendVector(double, double) using a vector object as parameter instead of individual coordinates
 void appendVector(VectorXZ vector)
          alternative to appendVector(double, double) using a vector object as parameter instead of individual coordinates
 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 drawColumn(Material material, Integer corners, VectorXYZ base, VectorXYZ cap, double radiusBottom, double radiusTop, boolean drawBottom, boolean drawTop)
          variant of drawColumn(Material, Integer, VectorXYZ, double, double, double, boolean, boolean) that allows arbitrarily placed columns
 void drawPolygon(Material material, VectorXYZ... vs)
           
 void drawTriangles(Material material, Collection<? extends TriangleXYZ> triangles)
           
 void drawTrianglesWithNormals(Material material, Collection<? extends TriangleXYZWithNormals> triangles)
           
 void drawTrianglesWithNormals(Material material, Collection<? extends TriangleXYZWithNormals> triangles, boolean asMesh)
           
 Class<RenderableToPOVRay> getRenderableType()
          returns the renderable type designed for this target
 void render(RenderableToPOVRay renderable)
          renders a renderable object to this target.
 
Methods inherited from class AbstractTarget
beginObject, drawBox, drawBox, drawTriangleFan, drawTriangleStrip, drawTriangleStrip
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

POVRayTarget

public POVRayTarget(PrintStream output)
Method Detail

getRenderableType

public Class<RenderableToPOVRay> getRenderableType()
Description copied from interface: Target
returns the renderable type designed for this target


render

public void render(RenderableToPOVRay renderable)
Description copied from interface: Target
renders a renderable object to this target. Usually, this means calling a "renderTo" method on that renderable, with this target as a parameter.


append

public void append(String code)
provides direct write access to the generated source code. This is intended for Renderables using special POVRay features.


append

public void append(int value)

append

public void append(double value)

drawTriangles

public void drawTriangles(Material material,
                          Collection<? extends TriangleXYZ> triangles)

drawTrianglesWithNormals

public void drawTrianglesWithNormals(Material material,
                                     Collection<? extends TriangleXYZWithNormals> triangles)

drawTrianglesWithNormals

public void drawTrianglesWithNormals(Material material,
                                     Collection<? extends TriangleXYZWithNormals> triangles,
                                     boolean asMesh)

drawPolygon

public void drawPolygon(Material material,
                        VectorXYZ... vs)
Specified by:
drawPolygon in interface Target<RenderableToPOVRay>
Overrides:
drawPolygon in class AbstractTarget<RenderableToPOVRay>

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<RenderableToPOVRay>
Overrides:
drawColumn in class AbstractTarget<RenderableToPOVRay>
corners - number of corners; null creates a cylinder for radiusBottom == radiusTop or (truncated) cone otherwise

drawColumn

public void drawColumn(Material material,
                       Integer corners,
                       VectorXYZ base,
                       VectorXYZ cap,
                       double radiusBottom,
                       double radiusTop,
                       boolean drawBottom,
                       boolean drawTop)
variant of drawColumn(Material, Integer, VectorXYZ, double, double, double, boolean, boolean) that allows arbitrarily placed columns


appendTriangle

public void appendTriangle(VectorXYZ a,
                           VectorXYZ b,
                           VectorXYZ c)

appendTriangle

public void appendTriangle(VectorXYZ a,
                           VectorXYZ b,
                           VectorXYZ c,
                           VectorXYZ na,
                           VectorXYZ nb,
                           VectorXYZ nc,
                           boolean smooth)

appendRGBColor

public void appendRGBColor(Color color)
adds a color. Syntax is "color rgb ".


appendMaterial

public void appendMaterial(Material material)

appendVector

public void appendVector(float x,
                         float y,
                         float z)
adds a vector to the String built by a StringBuilder. Syntax is "".


appendVector

public void appendVector(double x,
                         double y,
                         double z)

appendVector

public void appendVector(VectorXYZ vector)
alternative to appendVector(double, double) using a vector object as parameter instead of individual coordinates


appendVector

public void appendVector(double x,
                         double z)
adds a vector to the String built by a StringBuilder. Syntax is "".


appendVector

public void appendVector(VectorXZ vector)
alternative to appendVector(double, double) using a vector object as parameter instead of individual coordinates


appendPolygon

public void appendPolygon(VectorXYZ... vs)
Parameters:
vs - polygon vertices; first and last should be equal

appendPrism

public void appendPrism(float y1,
                        float y2,
                        VectorXZ... vs)