com.partnersoft.geometry
Class Mesh

java.lang.Object
  extended by com.partnersoft.geometry.Mesh

public class Mesh
extends java.lang.Object

A concave 2D polygon that has been tessellated into OpenGL primitives.

Author:
Russell Cagle Copyright 2005 Partner Software, Inc.

Constructor Summary
Mesh()
           
 
Method Summary
 void begin(int argGlPrimitiveType)
          Begin a group of primitives.
 void draw(javax.media.opengl.GL gl)
          Draw the mesh using glBegin() and glVertex().
 void drawOutline(javax.media.opengl.GL gl)
          Draw the mesh as an outline of its components.
 void drawPoints(javax.media.opengl.GL gl)
          Draw the mesh as a bunch of points.
 void end()
          Called to end a group of primitives.
 void vertex(float x, float y)
          Adds a vertex to the group of primitives.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mesh

public Mesh()
Method Detail

begin

public void begin(int argGlPrimitiveType)
Begin a group of primitives. Called when building the mesh.


draw

public void draw(javax.media.opengl.GL gl)
Draw the mesh using glBegin() and glVertex(). This function doesn't change any state, notably the color or the normal.


drawOutline

public void drawOutline(javax.media.opengl.GL gl)
Draw the mesh as an outline of its components. Otherwise identitcal to draw() in that it doesn't change any state.


drawPoints

public void drawPoints(javax.media.opengl.GL gl)
Draw the mesh as a bunch of points.


end

public void end()
Called to end a group of primitives.


vertex

public void vertex(float x,
                   float y)
Adds a vertex to the group of primitives.