Ignore:
Timestamp:
02/05/07 13:29:55 (17 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/vmi/include/simplify.h

    r1007 r2090  
    77#include "bheap.h" 
    88 
     9#include        <map> 
     10 
     11using   namespace       std; 
     12 
    913namespace       VMI 
    1014{ 
    11 extern GLdouble computeEdgeCost(Mesh *mesh, int e); 
     15        extern GLdouble computeEdgeCost(Mesh *mesh, int e); 
    1216 
    13 extern bheap_t *initHeap(Mesh *mesh); 
     17        extern bheap_t *initHeap(Mesh *mesh); 
    1418 
    15 extern bheap_t *updateHeap(bheap_t *h, Mesh *mesh, Change *c); 
     19        extern bheap_t *updateHeap(bheap_t *h, Mesh *mesh, Change *c); 
    1620 
    17 extern void simplifyModel(Mesh *mesh, GLuint numDemandedTri); 
     21        extern void simplifyModel(Mesh *mesh, GLuint numDemandedTri); 
    1822 
    1923 
    20 extern void bh_mydump(Mesh *mesh, bheap_t *h); 
    21 extern GLdouble computeEdgeLength(Vertex *vertices, int u, int v); 
     24        extern void bh_mydump(Mesh *mesh, bheap_t *h); 
     25        extern GLdouble computeEdgeLength(Vertex *vertices, int u, int v); 
    2226 
    23 extern void swap(unsigned int *i, unsigned int *j); 
    24 extern void chooseBestEndPoints(Mesh *mesh, int e); 
     27        extern void chooseBestEndPoints(Mesh *mesh, int e); 
    2528 
     29        extern void     initVertexMultimap(     Mesh *mesh, 
     30                                                                                                                                        multimap<int,int> &vertexMultimap); 
     31        ///////////////////////////////////////////////////////////////////////////// 
     32        //      Coordinates class. 
     33        ///////////////////////////////////////////////////////////////////////////// 
     34        class _float3_ 
     35        { 
     36                public: 
     37 
     38                        float x,y,z; 
     39 
     40                        _float3_(float x=0.0f, float y=0.0f, float z=0.0f) 
     41                        { 
     42                                this->x = x; this->y = y; this->z = z; 
     43                        } 
     44 
     45                        _float3_(const _float3_ &f) 
     46                        { 
     47                                x=f.x; y=f.y; z=f.z; 
     48                        } 
     49 
     50                        _float3_ & operator=(const _float3_ &f) 
     51                        { 
     52                                x=f.x; y=f.y; z=f.z; return *this; 
     53                        } 
     54 
     55                        bool operator<(const _float3_ &f) const 
     56                        { 
     57                                if (x<f.x) return true; 
     58                                if (x>f.x) return false; 
     59                                if (y<f.y) return true; 
     60                                if (y>f.y) return false; 
     61                                if (z<f.z) return true; 
     62                                if (z>f.z) return false; 
     63                                return false; 
     64                        } 
     65        }; 
     66 
     67        extern int extractValidEdge(Mesh *mesh, bheap_t *h); 
     68 
     69        extern int      isValidEdge(Mesh        *mesh,  int edge); 
     70 
     71        void    deleteVertexOfMap(Mesh  *mesh, int u); 
     72        bool    compareVertices(Vertex *vertices,int    u,      int v); 
     73        void    contractInitialMesh(Mesh        *mesh); 
     74        void    contractTwinVertices(Mesh       *mesh,  int     u,      int     v); 
     75 
     76        //      Vectors of positions, normals and texture coordinates. 
     77        extern  vector<Geometry::Vector3>       vPositions; 
     78        extern  vector<Geometry::Vector3>       vNormals; 
     79        extern  vector<Geometry::Vector2>       vTexCoords; 
    2680} 
    2781 
Note: See TracChangeset for help on using the changeset viewer.