⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 strech.h

📁 任意给定三维空间的点集
💻 H
字号:
/*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* * strech.h - *     \*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/#ifndef  __STRECH__H#define  __STRECH__Hclass  FaceIds{public:    int   a, b, c;};void   ThreeDs_get_stats( char  * filename );void   ply_get_stats( char  * filename );bool  str_prefix_eq( char  * line, char  * prefix );class  ArrFaceIds : public Array<FaceIds> {};#define  BBOX_CHUNK   1000class ArrBBox3d : public Array<BBox3d> {};class  PolyModel{public:    ArrPoint3d   vertices;    ArrFaceIds   faces;    ArrBBox3d    vert_bboxes;    double   * p_dist_nn;    double   * p_longest_edge;    double  longest_edge, shortest_edge;    int  boxes_num;    int  vertices_num, faces_num;    bool  f_first_edge_registeration;    double  global_ratio, edge_ratio;    int  worst_vertex;    BBox3d   modelBB;public:    void  init() {        f_first_edge_registeration = true;        worst_vertex = -1;    }    Point3d   getWorstVertex() const {        assert( worst_vertex >= 0 );        return  vertices[ worst_vertex ];    }    int   getFacesNum() {        return  faces.size();    }    void   computeBBox();    FaceIds  getFace( int  ind ) {        return  faces[ ind ];    }    ArrPoint3d  & getVertices() {        return  vertices;    }    BBox3d  & getVertexBBox( int  id ) {        return  vert_bboxes[ id / BBOX_CHUNK ];    }    int  getBBoxStart( int  bind ) {        return  bind  * BBOX_CHUNK;            }    int  getBBoxEnd( int  bind ) {        int  lim;        lim = (bind + 1) * BBOX_CHUNK - 1;        if  ( lim >= vertices_num )            return  vertices_num - 1;        return  lim;    }    void  read_poly_file( const char  * filename );    void  init_vertices_bboxes();    void  compute_longest_edges();    double  find_nn( int  vert_id );    void    find_nn_all();        void  register_edge( int  a, int  b );    void  print_stat( const char  * filename );    void  find_bbox_nn( Point3d  & pnt, int  vert_id,                           double  & curr, int  bbox_ind );};#else   /* __STRECH__H */#error  Header file strech.h included twice#endif  /* __STRECH__H *//* strech.h - End of File ------------------------------------------*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -