#ifndef __GEO_MESH_SIMP_SEQUENCE__ #define __GEO_MESH_SIMP_SEQUENCE__ #include #include #include "GeoBase.h" #include "GeoSerializable.h" #include #include namespace Geometry { /// Represents the simplification sequence applied to a given mesh. /** This class stores information about the simplification process, giving for each step the vertex that collapses, the vertex that remains unchanged, the two triangles that disappear and the new triangles that come out. It also offers a method to generate a mesh simplification sequence format file. \n This file begins with a line stating the name of the mesh file it refers to. Every line gives the following information: \n \n -# Vertex that collapses. -> asumo mV0\n -# Vertex that remains unchanged. -> asumo mV1\n -# The two triangles that disappear.\n -> no tiene por qué ser 2 ?????? -# & as a separator.\n -# The list of new triangles.\n . \n */ class MeshSimplificationSequence: public Serializable { public: /// Class constructor. MeshSimplificationSequence(void); /// Class destructor. ~MeshSimplificationSequence(void); /// Copy constructor //MeshSimplificationSequence(const MeshSimplificationSequence&); /// Assignment operator //MeshSimplificationSequence& operator =(const MeshSimplificationSequence&); /// Represents a simplification step in the sequence. struct Step { Index mV0, mV1; Index mT0, mT1; float x,y,z; std::vector mModfaces; // Indicates the the step is obligatory to execute // joined width the following step. unsigned int obligatorio; }; char* meshName; // Nombre del mesh para guardar en el fichero de la secuencia de simplificación. /// Stores all the simplification steps. std::vector mSteps; /// Loads a simplification sequence from a Serializer. void Load(Serializer &s); /// Saves the contents of the data structures. void Save(Serializer &s); // 'Inserts the mesh name into the meshsimplificationsequence void putMeshName(char *); char *getMeshName(void); }; } #endif