#ifndef __GEO_TREE_SIMP_SEQUENCE__ #define __GEO_TREE_SIMP_SEQUENCE__ #include #include #include "GeoBase.h" #include "GeoSerializable.h" namespace Geometry { /// Represents the simplification sequence applied to a given mesh. /** This class stores information about the simplification process, giving for each step the four triangles that compose the two leaves that will be collapsed and the two triangles of the new leaf. It also offers a method to generate a tree simplification sequence format file. \n This file begins with a line stating the name of the mesh file it refers to. This file stores the leaves geometry and at the end of the file one line for each leaf collapse operation. \n \n begin\n v / vertex sequence v\n v …\n f // faces sequence (two faces compose one leaf) including new faces\n f // added due to the simplification process\n f …\n end\n // one collapse record per line\n \n Those records gives the following information:\n -# The four triangles that compose the two leaves that will be collapsed.\n -# & as a separator.\n -# The two triangles for the new leaf.\n . */ class TreeSimplificationSequence : public Serializable { public: /// Class constructor TreeSimplificationSequence(void); /// Class destructor ~TreeSimplificationSequence(void); /// Copy constructor //TreeSimplificationSequence(const TreeSimplificationSequence&); /// Assignment operator //TreeSimplificationSequence& operator =(const TreeSimplificationSequence&); /// Represents a Simplification Step in the sequence. struct Step { Index mV0, mV1; Index mT0, mT1; Index mNewQuad[4]; }; /// 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); char* meshName; // Nombre del mesh para guardar en el fichero de la secuencia de simplificación. // 'Inserts the mesh name into the meshsimplificationsequence void putMeshName(char *); char *getMeshName(void); }; } #endif