org.xith3d.spatial.clipping
Class Polygon

java.lang.Object
  extended by org.xith3d.spatial.clipping.Polygon

public class Polygon
extends java.lang.Object

Simple class encapsulating a set of points which define the outline of a coplanar polygon. Usually this is a triagle or a quad.


Constructor Summary
Polygon()
           
Polygon(java.util.List<org.openmali.vecmath2.Tuple3f> vertices)
           
 
Method Summary
 void add(float x, float y, float z)
           
 void add(org.openmali.vecmath2.Tuple3f v)
           
 boolean contains(org.openmali.vecmath2.Tuple3f point)
           
 java.util.List<Polygon> getAsTriangles()
           
 java.util.List<org.openmali.vecmath2.Tuple3f> getVertices()
           
 void print()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(java.util.List<org.openmali.vecmath2.Tuple3f> vertices)

Polygon

public Polygon()
Method Detail

getVertices

public java.util.List<org.openmali.vecmath2.Tuple3f> getVertices()

add

public void add(org.openmali.vecmath2.Tuple3f v)

add

public void add(float x,
                float y,
                float z)

contains

public boolean contains(org.openmali.vecmath2.Tuple3f point)

getAsTriangles

public java.util.List<Polygon> getAsTriangles()
Returns:
a list of triangles

print

public void print()