MarSTDv2004: CGeomBuilder.h Source File

MarSTDv2004

CGeomBuilder.h

Go to the documentation of this file.
00001 #ifndef __cGEOMBUILDER_h__
00002 #define __cGEOMBUILDER_h__
00003 
00005 // MarSTD version 2004 - (c)2004 - Marcel Smit                      //
00006 //                                                                  //
00007 // [email protected]                                      //
00008 // [email protected]                                          //
00009 //                                                                  //
00010 // This code may not be used in a commercial product without my     //
00011 // permission. If you redistribute it, this message must remain     //
00012 // intact. If you use this code, some acknowledgement would be      //
00013 // appreciated. ;-)                                                 //
00015 
00017 
00018 
00019 
00020 #include <math.h>
00021 #include "cDEBUG.h"
00022 #include "cMATRIX.h"
00023 
00024 //---------------------------------------------------------------------------
00025 
00027 
00047 class CGeomBuilder {
00048 
00049         private:
00050 
00051     CGeomBuilder()
00052     {
00053     
00054     }
00055     ~CGeomBuilder()
00056     {
00057     
00058     }
00059     
00060         public:
00061     
00065     static CGeomBuilder& I()
00066     {
00067         static CGeomBuilder geomBuilder;
00068         return geomBuilder;
00069     }
00070     
00071         public:
00072  
00073     CMatrix matrix; 
00074     
00075         public:
00076 
00080     void cube(CMesh& mesh);
00086     void cilinder(CMesh& mesh, int sides);
00091     void circle(CMesh& mesh, int sides);
00096     void cone(CMesh& mesh, int sides);
00102     void sphere(CMesh& mesh, int div1, int div2);
00103 
00104     void donut(CMesh& mesh, int sides, int slices, float r1, float r2);
00105     
00106     private:
00107     
00108     void transform(CPoly* poly);
00109 
00110 };
00111 
00112 #endif

Generated on Tue Feb 8 21:59:02 2005 for MarSTDv2004 by  doxygen 1.4.1