org.osm2world.core.target.obj
Class ObjTarget

Object
  extended by AbstractTarget<R>
      extended by FaceTarget<RenderableToObj>
          extended by ObjTarget
All Implemented Interfaces:
Target<RenderableToObj>

public class ObjTarget
extends FaceTarget<RenderableToObj>


Nested Class Summary
 
Nested classes/interfaces inherited from class FaceTarget
FaceTarget.Face, FaceTarget.IsolatedTriangle
 
Field Summary
 
Fields inherited from class AbstractTarget
BOX_TEX_COORDS_1, BOX_TEX_COORDS_2, config
 
Constructor Summary
ObjTarget(PrintStream objStream, PrintStream mtlStream)
           
 
Method Summary
 void beginObject(WorldObject object)
          announces the begin of the draw* calls for a WorldObject.
 void drawFace(Material material, List<VectorXYZ> vs, List<VectorXYZ> normals, List<List<VectorXZ>> texCoordLists)
           
 void drawTriangles(Material material, Collection<? extends TriangleXYZ> triangles, List<List<VectorXZ>> texCoordLists)
          draws triangles.
 void drawTrianglesWithNormals(Material material, Collection<? extends TriangleXYZWithNormals> triangles, List<List<VectorXZ>> texCoordLists)
          draws triangles with explicitly defined normal vectors.
 Class<RenderableToObj> getRenderableType()
          returns the renderable type designed for this target
 boolean reconstructFaces()
          decides whether faces should be reconstructed from triangulations and other primitives.
 void render(RenderableToObj renderable)
          renders a renderable object to this target.
 
Methods inherited from class FaceTarget
combineTrianglesToFaces, createFaceFromTriangle, drawConvexPolygon, finish, flushReconstructedFaces, normalAlmostEquals
 
Methods inherited from class AbstractTarget
drawBox, drawColumn, drawTriangleFan, drawTriangleStrip, setConfiguration
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjTarget

public ObjTarget(PrintStream objStream,
                 PrintStream mtlStream)
Method Detail

getRenderableType

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


render

public void render(RenderableToObj 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.


reconstructFaces

public boolean reconstructFaces()
Description copied from class: FaceTarget
decides whether faces should be reconstructed from triangulations and other primitives.

Specified by:
reconstructFaces in class FaceTarget<RenderableToObj>

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<RenderableToObj>
Overrides:
beginObject in class FaceTarget<RenderableToObj>

drawFace

public void drawFace(Material material,
                     List<VectorXYZ> vs,
                     List<VectorXYZ> normals,
                     List<List<VectorXZ>> texCoordLists)
Specified by:
drawFace in class FaceTarget<RenderableToObj>

drawTriangles

public void drawTriangles(Material material,
                          Collection<? extends TriangleXYZ> triangles,
                          List<List<VectorXZ>> texCoordLists)
Description copied from interface: Target
draws triangles.

Specified by:
drawTriangles in interface Target<RenderableToObj>
Overrides:
drawTriangles in class FaceTarget<RenderableToObj>
texCoordLists - one texture coordinate list per texture. Each must have three coordinates per triangle. Can be null if no texturing information is available.

drawTrianglesWithNormals

public void drawTrianglesWithNormals(Material material,
                                     Collection<? extends TriangleXYZWithNormals> triangles,
                                     List<List<VectorXZ>> texCoordLists)
Description copied from interface: Target
draws triangles with explicitly defined normal vectors.

Specified by:
drawTrianglesWithNormals in interface Target<RenderableToObj>
Overrides:
drawTrianglesWithNormals in class FaceTarget<RenderableToObj>
See Also:
Target.drawTriangles(Material, Collection, List)