//======================================== // Class abstracting the geometric mesh. // Nicolau Sunyer & Sergi Funtané (10/13/2005). // Universitat de Girona. //======================================== #ifndef CMESH_H #define CMESH_H //Includes. #include "Ogre.h" #include "OgreXMLMeshSerializer.h" #include "OgreMeshSerializer.h" #include "OgreXMLSkeletonSerializer.h" #include "OgreSkeletonSerializer.h" #include "OgreXMLPrerequisites.h" #include "OgreDefaultHardwareBufferManager.h" #include #include #include //#include //#include //#include "structsVisualCAD.h" #include "SNStr.h" //progress bar #include //End Includes. using namespace std; using namespace Ogre; struct XmlOptions { String source; String dest; String sourceExt; String destExt; String logFile; bool interactiveMode; unsigned short numLods; Real lodDist; Real lodPercent; size_t lodFixed; bool usePercent; bool generateEdgeLists; bool generateTangents; bool reorganiseBuffers; bool optimiseAnimations; bool quietMode; bool d3d; bool gl; Serializer::Endian endian; }; class CVert // Vert Class. { public: float x; // X Component float y; // Y Component float z; // Z Component }; typedef CVert CVec; // Synonimous Definitions. class CColor // Color Class. { public: unsigned char r; // R Component unsigned char g; // G Component unsigned char b; // B Component }; class CColorf // Color2 Class. { public: float r; // R Component. float g; // G Component. float b; // B Component. }; class CTexCoord //TexCoord Class. { public: float u; // U Component. float v; // V Component. }; class CSphere //Sphere Class. { public: CVert center; // Center. float radius; // Radius. }; //Class Definition. class CMesh { public: CMesh(); // Mesh Constructor ~CMesh(); // Mesh Destructor void LoadMesh(char *argv); void FreeMem(); void ShowMesh(char *filename); snObject m_pObject; //Internal Format. private: void parseArgs(char *argv, XmlOptions &opts); void meshToXML(XmlOptions opts); float getValue(const char *string, int &i); void XMLToSNStr(char *name); void NormalizeIt(wxProgressDialog &dialog); LogManager* logMgr; Math* mth; MaterialManager* matMgr; SkeletonManager* skelMgr; MeshSerializer* meshSerializer; XMLMeshSerializer* xmlMeshSerializer; SkeletonSerializer* skeletonSerializer; XMLSkeletonSerializer* xmlSkeletonSerializer; DefaultHardwareBufferManager *bufferManager; MeshManager* meshMgr; ResourceGroupManager* rgm; }; #endif // CMESH_H