Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

brush.h

Go to the documentation of this file.
00001 // Brush Class    by Alan Baylis 2003
00002 
00003 #ifndef Brush_H
00004 #define Brush_H
00005 
00006 #include "polygon.h"
00007 
00008 // CSG brush class
00009 class BRUSH
00010 {
00011     public:
00012         BRUSH();
00013           ~BRUSH();
00014 
00015         int Compare(const BRUSH& Brush);
00016         int GetMyPosition() const {return linkPosition;}
00017         void SetMyPosition(int newPosition) {linkPosition = newPosition;}
00018         int linkPosition;
00019 
00020         // methods and member variables required to link brushes
00021         BRUSH* NextBrush;
00022         bool IsLast();        
00023         BRUSH* GetNext();
00024         void AddBrush(BRUSH* Brush);
00025         void SetNext(BRUSH* Brush);
00026         BRUSH* CopyList();
00027 
00028         int id;
00029         int numPolygons;
00030         POLYGON Polygon[30];
00031 
00032         // operator overloading
00033         const bool BRUSH::operator == (const BRUSH &Brush) const
00034         {
00035             if (id == Brush.id)
00036             {
00037                 if (numPolygons == Brush.numPolygons)
00038                 {
00039                     for (int loop = 0; loop < numPolygons; loop++)
00040                     {
00041                         if (!(Polygon[loop] == Brush.Polygon[loop]))
00042                             return false;
00043                     }
00044                     return true;
00045                 }
00046             }
00047             return false;
00048         }
00049 };
00050 
00051 void DeleteList(BRUSH* Brush);
00052 void InvertBrushPolygons(BRUSH* Brush);
00053 void Set1stVertices();
00054 void Set2ndVertices();
00055 void Set3rdVertices();
00056 void SetBrushPolygons();
00057 void CreateBrushSet();
00058 void ResetBrushes();
00059 void RenderWireframeBrush(BRUSH* Brush);
00060 void RenderTexturedBrush(BRUSH* Brush);
00061 void DrawBrushes();
00062 
00063 #endif // BRUSH_H
00064 

Generated on Fri Dec 23 05:15:46 2005 for Constructive Solid Geometry by doxygen1.2.15