Ignore:
Timestamp:
06/09/06 08:24:19 (18 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/SimplificationMethod.h

    r981 r1007  
    2222        int initialFaceCount; 
    2323 
    24         inline qslim::vert_info& vertex_info(qslim::Vertex *v){ return vinfo(v->validID()); } 
    25         qslim::real pair_mesh_penalty(qslim::Model& M, qslim::Vertex *v1, qslim::Vertex *v2, qslim::Vec3& vnew); 
    26         int predict_face(qslim::Face& F, qslim::Vertex *v1, qslim::Vertex *v2, qslim::Vec3& vnew, qslim::Vec3& f1, qslim::Vec3& f2, qslim::Vec3& f3); 
     24        inline qslim::vert_info& vertex_info(qslim::Vertex *v) 
     25        { 
     26                return vinfo(v->validID()); 
     27        } 
     28         
     29        qslim::real pair_mesh_penalty(qslim::Model& M, 
     30                                                                                                                                qslim::Vertex *v1, 
     31                                                                                                                                qslim::Vertex *v2, 
     32                                                                                                                                qslim::Vec3& vnew); 
     33         
     34        int predict_face(qslim::Face& F, 
     35                                                                        qslim::Vertex *v1, 
     36                                                                        qslim::Vertex *v2, 
     37                                                                        qslim::Vec3& vnew, 
     38                                                                        qslim::Vec3& f1, 
     39                                                                        qslim::Vec3& f2, 
     40                                                                        qslim::Vec3& f3); 
     41         
    2742        bool check_for_pair(qslim::Vertex *v0, qslim::Vertex *v1); 
     43         
    2844        qslim::pair_info *new_pair(qslim::Vertex *v0, qslim::Vertex *v1); 
     45         
    2946        void delete_pair(qslim::pair_info *pair); 
     47         
    3048        void do_contract(qslim::Model& m, qslim::pair_info *pair); 
     49         
    3150        bool decimate_quadric(qslim::Vertex *v, qslim::Mat4& Q); 
     51         
    3252        void decimate_contract(qslim::Model& m); 
     53         
    3354        qslim::real decimate_error(qslim::Vertex *v); 
     55         
    3456        qslim::real decimate_min_error(); 
     57         
    3558        qslim::real decimate_max_error(qslim::Model& m); 
     59         
    3660        void decimate_init(qslim::Model& m, qslim::real limit); 
     61         
    3762        bool pair_is_valid(qslim::Vertex *u, qslim::Vertex *v); 
     63         
    3864        void simplifmethod_run(int,     Geometry::TIPOFUNC      upb=0); 
     65         
    3966        void simplifmethod_runv(int,    Geometry::TIPOFUNC      upb=0); 
     67         
    4068        void simplifmethod_init(void); 
    4169 
    42         //To map the mesh with de simplification method structure 
    43         std::map<int,std::vector<int> > submeshmap; //submeshes which pertains each vertex 
    44         std::map<int,std::vector<int> > vertexbuffermap; //vertices of the VertexBuffer that point at this vertex of the simplification method 
     70        //      To map the mesh with de simplification method structure. 
     71        //      Submeshes which pertains each vertex. 
     72        std::map<int,std::vector<int> > submeshmap; 
     73         
     74        //      Vertices of the VertexBuffer that point  
     75        //      at this vertex of the simplification method. 
     76        std::map<int,std::vector<int> > vertexbuffermap;  
    4577 
    46         //simplification sequence of the simplification method 
     78        //      Simplification sequence of the simplification method. 
    4779        std::vector<Geometry::MeshSimplificationSequence::Step> decim_data; 
     80         
    4881        std::string meshName; 
     82         
    4983        void WriteOBJ(void); 
     84         
    5085        unsigned int *first_index_submesh; 
     86         
    5187        //std::vector<qslim::pair_info *> pointers_to_remove; 
    5288 
    5389        int indexMeshLeaves; 
     90         
    5491public: 
     92         
    5593        const Geometry::Mesh *objmesh; 
    56         int number_of_triangles; //total number of triangles of all the submeshes 
     94         
     95        //      Total number of triangles of all the submeshes. 
     96        int number_of_triangles; 
     97         
    5798        SimplificationMethod(const Geometry::Mesh *m); 
     99         
    58100        void geomesh2simplifModel(void); 
    59         Geometry::MeshSimplificationSequence *Decimate(float lod, int simpliftype,Geometry::TIPOFUNC    upb=0); 
     101         
     102        Geometry::MeshSimplificationSequence *Decimate( float lod, 
     103                                                                                                                                                                                                        int simpliftype, 
     104                                                                                                                                                                                                        Geometry::TIPOFUNC      upb=0); 
     105         
    60106        void setMeshLeaves(int meshLeaves); 
    61107 
    62         //      Gets mesh simplified. 
     108        ///     Gets mesh simplified. 
    63109        Geometry::Mesh  *       GetMesh(); 
    64110         
     
    66112        ~SimplificationMethod(); 
    67113}; 
     114 
Note: See TracChangeset for help on using the changeset viewer.