Ignore:
Timestamp:
05/24/06 10:47:49 (18 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoMeshSimplifier.h

    r891 r980  
    22#define __GEO_MESH_SIMPLIFIER__ 
    33 
    4 #include "GeoMesh.h" 
    5 #include "GeoMeshSimpSequence.h" 
     4#include        <math.h> 
     5#include        "GeoMesh.h" 
     6#include        "GeoMeshSimpSequence.h" 
     7#include        "vmi_simplifier.h" 
     8 
    69//#include "SimplificationMethod.h" 
    710 
     
    3841 
    3942                        /// Starts the simplification process. Receives as a parameter the LOD factor in a range of [0,1]. This is a pure virtual method and must be overloaded in a derived class that implements a simplification algorithm. 
    40                         virtual void Simplify (Geometry::Real)=0; 
     43                        virtual void Simplify(Geometry::Real)=0; 
    4144 
    4245                        /// Starts the simplification process. Receives as a parameter the number of vertices of the resulting mesh. This is a pure virtual method and must be overloaded in a derived class that implements a simplification algorithm. 
    43                         virtual void Simplify (Geometry::uint32)=0; 
     46                        virtual void Simplify(Geometry::uint32)=0; 
    4447 
    4548                        /// Returns the simplified mesh. 
    46                         Mesh *GetMesh (); 
     49                        Mesh *GetMesh(); 
    4750 
    4851                        /// Returns the simplification sequence for general meshes. 
     
    5558 
    5659                        //private: // fer protected 
    57                         Mesh *meshsalida; 
    58                         MeshSimplificationSequence *msimpsequence; 
    59                         const Mesh *objmesh; 
     60                        Mesh                                                                                            *mGeoMesh; 
     61                        MeshSimplificationSequence      *msimpsequence; 
     62                        const Mesh                                                                      *objmesh; 
    6063 
    6164                        Geometry::Index indexMeshLeaves; 
     
    7073        { 
    7174        private: 
     75                 
     76                //      Auxiliar vertex buffer. 
     77                Geometry::VertexBuffer  *mVB; 
     78                 
     79                //      Loads a vmi mesh with a given geometry mesh. 
     80                VMI::Mesh * initMeshStructure(Geometry::Mesh    *geoMesh); 
    7281 
     82                //      Loads a geometry mesh with a given vmi mesh. 
     83                void    loadMesh(); 
     84 
     85                //      Find vertex in auxiliar vertex buffer. 
     86                void    findVertex(size_t       submesh, size_t index); 
     87                 
    7388        public: 
     89 
    7490                /// Class constructor. Will call Simplifier class constructor. 
    75                 ViewPointDrivenSimplifier (const Geometry::Mesh         *, 
    76                                                                                                         Geometry::TIPOFUNC              upb=0); 
     91                ViewPointDrivenSimplifier(      const Geometry::Mesh    *geoMesh, 
     92                                                                                                                                Geometry::TIPOFUNC              upb=0); 
    7793 
    7894                /// Class destructor. 
    79                 virtual ~ViewPointDrivenSimplifier (void); 
     95                ~ViewPointDrivenSimplifier(void); 
    8096 
    8197                /// Copy constructor 
     
    86102 
    87103                /// Starts the simplification process. Receives as a parameter the LOD factor in a range of [0,1]. Implements the Simplifier::Simplify method to perform an image based simplification. 
    88                 void Simplify (Geometry::Real); 
     104                void Simplify(Geometry::Real); 
    89105 
    90106                /// Starts the simplification process. Receives as a parameter the number of vertices of the resulting mesh. Implements the Simplifier::Simplify method to perform an image based simplification. 
    91                 void Simplify (Geometry::uint32); 
     107                void Simplify(Geometry::uint32); 
     108 
     109                // Returns the simplified mesh. 
     110                //Mesh *GetMesh(); 
     111 
    92112 
    93113        }; 
     
    100120        public: 
    101121                /// Class constructor. Will call Simplifier class constructor. 
    102                 GeometryBasedSimplifier (       const Geometry::Mesh    *, 
     122                GeometryBasedSimplifier(        const Geometry::Mesh    *geoMesh, 
    103123                                                                                                                        Geometry::TIPOFUNC              upb=0); 
    104124 
    105125                /// Class destructor. 
    106                 virtual ~GeometryBasedSimplifier (void); 
     126                ~GeometryBasedSimplifier(void); 
    107127 
    108128                /// Copy constructor 
     
    113133 
    114134                /// Starts the simplification process. Receives as a parameter the LOD factor in a range of [0,1]. Implements the Simplifier::Simplify method to perform an image based simplification. 
    115                 void Simplify (Geometry::Real); 
     135                void Simplify(Geometry::Real); 
    116136 
    117137                /// Starts the simplification process. Receives as a parameter the number of vertices of the resulting mesh. Implements the Simplifier::Simplify method to perform an image based simplification. 
    118                 void Simplify (Geometry::uint32); 
     138                void Simplify(Geometry::uint32); 
    119139        }; 
    120140} // end of Geometry namespace; 
    121141 
    122142#endif 
     143 
Note: See TracChangeset for help on using the changeset viewer.