#ifndef __GEO_TREE_CONSTRUCTOR__ #define __GEO_TREE_CONSTRUCTOR__ #include "GeoTreeSimpSequence.h" #include "GeoMesh.h" namespace Geometry { /// Construction module for multiresolution tree models. /** This module stores general tree multiresolution representations using our own specific file format. It takes as inputs the TreeSimplificationSequence computed by the TreeSimplification module and writes a file with the simplification sequence.\n The LodTree file begins with a line stating the name of the mesh with leaves it refers to and also the name of the mesh with the trunk and the name of the LodStrips file refered to this mesh. File format:\n -# Tree reference.\n -# Number of collapses.\n -# Number of triangles added to the model (new leaves).\n -# Triangle data. -# Collapses: the two leaves that collapses and the new leaf.\n . \n Inputs:\n - The leaves collapse sequence computed by the simplification module (Geometry::TreeSimplificationSequence). . Outputs:\n - The module writes a file with the simplification sequence. . */ class LodTreeConstructor : public Serializable { public: /// Constructor, gets a mesh and a simplification sequence, and generates a multiresolution model. LodTreeConstructor(const Mesh *, const TreeSimplificationSequence *); /// Class Destructor ~LodTreeConstructor(void); /// Copy constructor //LodTreeConstructor(const LodTreeConstructor&); /// Assignment operator //LodTreeConstructor& operator =(const LodTreeConstructor&); /// Saves the multiresolution model into a file. /// It writes the change sequence using the serializer as a parameter. void Save (Serializer &s); /// Load void Load(Serializer &s); }; } #endif