00001 // Polygon Class by Alan Baylis 2001 00002 00003 #ifndef POLYGON_H 00004 #define POLYGON_H 00005 00006 #include "texture.h" 00007 #include "vector.h" 00008 #include "vertex.h" 00009 00010 class POLYGON 00011 { 00012 public: 00013 POLYGON(); 00014 ~POLYGON(); 00015 00016 VECTOR GetNormal(); 00017 void SetNormal(); 00018 00019 float Scale[2]; 00020 float Shift[2]; 00021 float Rotate; 00022 unsigned int Texture; 00023 int numVertices; 00024 VERTEX Vertex[3]; 00025 }; 00026 00027 VECTOR GetEdgeIntersection(VECTOR point0, VECTOR point1, POLYGON planePolygon); 00028 int SplitPolygon(POLYGON triangleToSplit, POLYGON planeTriangle, POLYGON* triangles); 00029 00030 #endif