org.osm2world.core.target.jogl
Class JOGLTarget

Object
  extended by AbstractTarget
      extended by PrimitiveTarget
          extended by JOGLTarget
All Implemented Interfaces:
Target

public class JOGLTarget
extends PrimitiveTarget


Constructor Summary
JOGLTarget(GL gl)
           
 
Method Summary
 void addWorldObjects(MapData mapData, Camera camera)
           
 void drawArrow(Color color, float headLength, VectorXYZ... vs)
           
 void drawLineLoop(Color color, List<? extends VectorXYZ> vs)
           
 void drawLineStrip(Color color, int width, VectorXYZ... vs)
           
 void drawLineStrip(Color color, List<VectorXYZ> vs)
           
 void drawLineStrip(Color color, VectorXYZ... vs)
           
 void drawPoints(Color color, VectorXYZ... vs)
           
 void drawPolygon(Color color, VectorXYZ... vs)
           
protected  void drawPrimitive(Primitive.Type type, Material material, List<? extends VectorXYZ> vertices, VectorXYZ[] normals)
           
 void drawText(String string, int x, int y)
           
 void drawText(String string, Vector3D pos)
           
 void drawTriangles(Color color, Collection<TriangleXYZ> triangles)
           
 void drawTriangleStrip(Color color, VectorXYZ... vs)
           
static int getGLConstant(Primitive.Type type)
           
static void setCameraMatrices(GL gl, Camera camera)
           
static void setFrontMaterialColor(GL gl, int pname, Color color)
           
static void setMaterial(GL gl, Material material)
           
static void setProjectionMatrices(GL gl, Projection projection)
           
static void setProjectionMatricesForPart(GL gl, Projection projection, double xStart, double xEnd, double yStart, double yEnd)
          similar to setProjectionMatrices(GL, Projection), but allows rendering only a part of the "normal" image.
 
Methods inherited from class PrimitiveTarget
drawPolygon, drawPolygon, drawTriangleFan, drawTriangles, drawTriangleStrip, drawTriangleStrip, drawTrianglesWithNormals
 
Methods inherited from class AbstractTarget
drawBox, drawColumn
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JOGLTarget

public JOGLTarget(GL gl)
Method Detail

drawPrimitive

protected void drawPrimitive(Primitive.Type type,
                             Material material,
                             List<? extends VectorXYZ> vertices,
                             VectorXYZ[] normals)
Specified by:
drawPrimitive in class PrimitiveTarget
vertices - vertices that form the primitive
normals - normal vector for each vertex; same size as vs

drawPoints

public void drawPoints(Color color,
                       VectorXYZ... vs)

drawLineStrip

public void drawLineStrip(Color color,
                          VectorXYZ... vs)

drawLineStrip

public void drawLineStrip(Color color,
                          List<VectorXYZ> vs)

drawLineStrip

public void drawLineStrip(Color color,
                          int width,
                          VectorXYZ... vs)

drawLineLoop

public void drawLineLoop(Color color,
                         List<? extends VectorXYZ> vs)

drawArrow

public void drawArrow(Color color,
                      float headLength,
                      VectorXYZ... vs)

drawTriangleStrip

public void drawTriangleStrip(Color color,
                              VectorXYZ... vs)

drawTriangles

public void drawTriangles(Color color,
                          Collection<TriangleXYZ> triangles)

drawPolygon

public void drawPolygon(Color color,
                        VectorXYZ... vs)

drawText

public void drawText(String string,
                     Vector3D pos)

drawText

public void drawText(String string,
                     int x,
                     int y)

setCameraMatrices

public static final void setCameraMatrices(GL gl,
                                           Camera camera)

setProjectionMatrices

public static final void setProjectionMatrices(GL gl,
                                               Projection projection)

setProjectionMatricesForPart

public static final void setProjectionMatricesForPart(GL gl,
                                                      Projection projection,
                                                      double xStart,
                                                      double xEnd,
                                                      double yStart,
                                                      double yEnd)
similar to setProjectionMatrices(GL, Projection), but allows rendering only a part of the "normal" image. For example, with xStart=0, xEnd=0.5, yStart=0 and yEnd=1, only the left half of the full image will be rendered, but it will be stretched to cover the available space. Only supported for orthographic projections!


setMaterial

public static final void setMaterial(GL gl,
                                     Material material)

setFrontMaterialColor

public static final void setFrontMaterialColor(GL gl,
                                               int pname,
                                               Color color)

addWorldObjects

public void addWorldObjects(MapData mapData,
                            Camera camera)

getGLConstant

public static final int getGLConstant(Primitive.Type type)