/* ========================================================================== * (C) 2005 Universidad Jaime I de Castellón * ========================================================================== * PROYECT: GAME TOOLS * ==========================================================================*/ /** CONTENT: Make triangle strips meshes from triangle list meshes. * * * @file GeoMeshStripifier.h /*===========================================================================*/ #ifndef __GEO_STRIPIFIER__ #define __GEO_STRIPIFIER__ #include namespace Geometry { /// Stripifier interface class. /** This module implements methods that extract triangle strips from triangle meshes. \n Inputs:\n - This module receives a pointer to a Geometry::Mesh object containing the model to be stripified. . Outputs:\n - The stripified mesh, contained also in a Geometry::Mesh object. . */ class MeshStripifier { public: /// Class constructor, receives as a parameter a const pointer to the object that describes a mesh. MeshStripifier (); MeshStripifier (const Geometry::Mesh *); /// virtual class destructor. virtual ~MeshStripifier (void); /// Copy constructor //MeshStripifier(const MeshStripifier&); /// Assignment operator //MeshStripifier& operator =(const MeshStripifier&); /// Starts the stripification process. This is a pure virtual method and must be overloaded in a derived class that implements a stripification algorithm. virtual int Stripify()=0; /// Returns the stripified mesh. Mesh * GetMesh (); // Sets what is the mesh that stores the leaves void setSubMeshLeaves(Geometry::Index); protected: // Progress bar function. Geometry::TIPOFUNC mUPB; // Mesh object. Geometry::Mesh *mGeoMesh; // Index of the submesh leaves. Geometry::Index mSubMeshLeaves; }; class CustomStripifier : public MeshStripifier { public: /// Class constructor, receives as a parameter a const pointer to the object that describes a mesh. CustomStripifier(); CustomStripifier( const Geometry::Mesh *geoMesh); /// Class destructor. ~CustomStripifier(void); /// Copy constructor //CustomStripifier(const CustomStripifier&); /// Assignment operator //CustomStripifier& operator =(const CustomStripifier&); /// Starts the stripification process. This is a custom stripification method. int Stripify(); /// Returns the stripified mesh. Mesh * GetMesh(); // Set the progress bar function. void SetProgressFunc(Geometry::TIPOFUNC upb); // Sets what is the submesh that stores the leaves void SetSubMeshLeaves(size_t submesh); }; } #endif