Class Polygon3D

java.lang.Object
  |
  +--Polygon3D

public class Polygon3D
extends java.lang.Object

A class to represent a 3D polygon


Field Summary
 Vector3D[] c
          Vector3D[] c
purpose : store the vertices of the polygon
 int count
          int count
purpose : total number of vertices in the polygon
 
Constructor Summary
Polygon3D()
          Default constructor
purpose : initialize a polygon with no vertices
Polygon3D(int total)
          Constructor
purpose : initialize a polygon with some vertices
 
Method Summary
static Polygon3D transformPolygon(Matrix m, Polygon3D x)
          purpose : multiply each point of the polygon by a matrix
static Polygon3D transformPolygonQ(Matrix m, Polygon3D x)
          purpose : multiply each point of the polygon by a matrix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

c

public Vector3D[] c
Vector3D[] c
purpose : store the vertices of the polygon

count

public int count
int count
purpose : total number of vertices in the polygon
Constructor Detail

Polygon3D

public Polygon3D()
Default constructor
purpose : initialize a polygon with no vertices

Polygon3D

public Polygon3D(int total)
Constructor
purpose : initialize a polygon with some vertices
Parameters:
total - total number of vertices in the polygon
Method Detail

transformPolygonQ

public static Polygon3D transformPolygonQ(Matrix m,
                                          Polygon3D x)
purpose : multiply each point of the polygon by a matrix
Parameters:
m - Matrix
x - Polygon3D
Returns:
a new copy of the transformed Polygon3D

transformPolygon

public static Polygon3D transformPolygon(Matrix m,
                                         Polygon3D x)
purpose : multiply each point of the polygon by a matrix
Parameters:
m - Matrix
x - Polygon3D
Returns:
a new copy of the transformed Polygon3D