de.javagl.swogl.geometry
Class TriangleSetGeometry

java.lang.Object
  extended by de.javagl.swogl.geometry.AbstractGeometry
      extended by de.javagl.swogl.geometry.TriangleSetGeometry
All Implemented Interfaces:
de.javagl.swogl.geometry.Geometry

public final class TriangleSetGeometry
extends de.javagl.swogl.geometry.AbstractGeometry

Implementation of a Geometry that stores a rectangle consisting of individual triangles (i.e. triangles that do not have common vertices). The vertex coordinates will range from (-width/2, -height/2) to (width/2,height/2), and the texture coordinates will be in [0,1]x[0,1].


Constructor Summary
TriangleSetGeometry(int width, int height, int verticesX, int verticesY)
          Creates a new TriangleSetGeometry with the given size and number of vertices
 
Method Summary
 
Methods inherited from class de.javagl.swogl.geometry.AbstractGeometry
addNormal, addTexCoord, addTriangle, addVertex, areTexCoordsModified, areVerticesModified, getNormal, getNumTriangles, getNumVertices, getTexCoord, getVertex, getVertexIndex, setNormal, setTexCoord, setTexCoordsModified, setVertex, setVerticesModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriangleSetGeometry

public TriangleSetGeometry(int width,
                           int height,
                           int verticesX,
                           int verticesY)
Creates a new TriangleSetGeometry with the given size and number of vertices

Parameters:
width - The size in x direction
height - The size in y direction
verticesX - The number of grid vertices in x direction Will be clamped to be at least 2.
verticesY - The number of grid vertices in y direction Will be clamped to be at least 2.