$search
Classes | |
| class | Edge |
| class | Face |
| class | Mat3x3 |
| class | Mesh |
| class | Region |
| class | Row1x3 |
| class | Timer |
| class | Triangulate |
| class | USpline |
| class | Vec3d |
| class | Vector2d |
| class | Vert |
Typedefs | |
| typedef std::vector< Vector2d > | Vector2dVector |
| typedef std::vector< int > | VertexList |
Functions | |
| void | controlCB (int control) |
| template<class T > | |
| static void | CrossProd (const T *x, const T *y, T *z) |
| template<class T > | |
| static void | CrossProd (const T &a, const T &b, const T &c, const T &d, const T &e, const T &f, T &g, T &h, T &i) |
| template<class T > | |
| static T | cube (const T &x) |
| template<class T > | |
| static T | Dist (const T *x1, const T *x2) |
| template<class T > | |
| static T | Dist2 (const T *x1, const T *x2) |
| template<class T > | |
| static T | Dot (const T *x, const T *y) |
| void | drawMesh (void) |
| template<class T > | |
| static void | FastInvert (T *matrix) |
| template<class T > | |
| static void | FastProject (const T *F, const T *vert, T *coord) |
| template<class T > | |
| static void | FastProject (const T *F, T x, T y, T z, T &xout, T &yout, T &zout) |
| template<class T > | |
| static void | FastProjectNoZ (const T *F, const T *vert, T *coord) |
| template<class T > | |
| static void | FastProjectNoZ (const T *F, T x, T y, T z, T &xout, T &yout) |
| template<class T > | |
| static void | FastProjectPrecompute (T *F, const T *P, const T *M, const T *V, T zoffset=0) |
| template<class T > | |
| static void | FindNormal (const T *p1, const T *p2, const T *p3, T *n) |
| int | gelimd (float **a, float *b, float *x, int n) |
| int | gelimd2 (float **a, float *b, float *x, int n) |
| template<class T > | |
| static T | Len (const T *x) |
| template<class T > | |
| static T | Len2 (const T *x) |
| void | loadOptions () |
| template<class T > | |
| static void | MMult (const T *M1, const T *M2, T *Mout) |
| template<class T > | |
| static void | Mouse2Q (T x1, T y1, T x2, T y2, T *q) |
| template<class T > | |
| static void | Mouse2TrackballPos (T x, T y, T *pos) |
| template<class T > | |
| static void | MVMult (const T *M, const T *V, T *Vout, bool apply_trans=true) |
| void | myGlutDisplay (void) |
| void | myGlutIdle (void) |
| void | myGlutKeyboard (unsigned char Key, int x, int y) |
| void | myGlutMenu (int value) |
| void | myGlutMotion (int x, int y) |
| void | myGlutMouse (int button, int button_state, int x, int y) |
| void | myGlutReshape (int x, int y) |
| template<class T > | |
| static void | Normalize (T *v) |
| Vec3d | operator* (const float a, const Vec3d &v) |
| Vec3d | operator* (const Vec3d &v, const Mat3x3 &m) |
| Mat3x3 | operator* (const float a, const Mat3x3 &m) |
| void | operator*= (Vec3d &v, const Mat3x3 &m) |
| Vec3d | operator+ (const float a, const Vec3d &v) |
| Vec3d | operator- (const float a, const Vec3d &v) |
| bool | operator< (Edge &ep, Face &fp) |
| bool | operator< (Vert &vp, Face &fp) |
| bool | operator< (Vert &vp, Edge &ep) |
| ostream & | operator<< (ostream &os, const Vert &v) |
| ostream & | operator<< (ostream &os, const Vec3d &v) |
| ostream & | operator<< (ostream &os, const Mat3x3 &m) |
| ostream & | operator<< (ostream &os, const Face &f) |
| ostream & | operator<< (ostream &os, const Edge &e) |
| template<class T > | |
| static void | Project (const T *P, const T *M, const T *V, const T *vert, T *coord, T zoffset=0) |
| template<class T > | |
| static void | Q2RotAndAxis (const T *q, T &rot, T *rotaxis) |
| template<class T > | |
| static void | QCompose (const T *q1, const T *q2, T *q3) |
| template<class T > | |
| static void | QNorm (T *q) |
| template<class T > | |
| static void | QRotate (T *x, const T *q) |
| template<class T > | |
| static void | RotAndAxis2Q (T rot, const T *rotaxis, T *q) |
| void | saveOptions () |
| template<class T > | |
| static T | sqr (const T &x) |
| int | startGUI (Mesh *m1_, Mesh *m2_) |
| int | startGUI (Mesh *m_) |
| template<class T > | |
| static void | TriBoundingSphere (const T *p1, const T *p2, const T *p3, T *cent, T &r) |
| void | update () |
Static class to triangulate any contour/polygon efficiently You should replace Vector2d with whatever your own Vector class might be. Does not support polygons with holes. Uses STL vectors to represent a dynamic array of vertices. This code snippet was submitted to FlipCode.com by John W. Ratcliff (jratcliff@verant.com) on July 22, 2000 I did not write the original code/algorithm for this this triangulator, in fact, I can't even remember where I found it in the first place. However, I did rework it into the following black-box static class so you can make easy use of it in your own code. Simply replace Vector2d with whatever your own Vector implementation might be.
| typedef std::vector< Vector2d > bmtk::Vector2dVector |
Definition at line 54 of file triangulate.h.
| typedef std::vector<int> bmtk::VertexList |
Definition at line 55 of file triangulate.h.
| void bmtk::controlCB | ( | int | control | ) |
Definition at line 129 of file compmesh.cc.
| static void bmtk::CrossProd | ( | const T * | x, | |
| const T * | y, | |||
| T * | z | |||
| ) | [inline, static] |
| static void bmtk::CrossProd | ( | const T & | a, | |
| const T & | b, | |||
| const T & | c, | |||
| const T & | d, | |||
| const T & | e, | |||
| const T & | f, | |||
| T & | g, | |||
| T & | h, | |||
| T & | i | |||
| ) | [inline, static] |
| static T bmtk::cube | ( | const T & | x | ) | [inline, static] |
| static T bmtk::Dist | ( | const T * | x1, | |
| const T * | x2 | |||
| ) | [inline, static] |
| static T bmtk::Dist2 | ( | const T * | x1, | |
| const T * | x2 | |||
| ) | [inline, static] |
| static T bmtk::Dot | ( | const T * | x, | |
| const T * | y | |||
| ) | [inline, static] |
| void bmtk::drawMesh | ( | void | ) |
Definition at line 327 of file compmesh.cc.
| static void bmtk::FastInvert | ( | T * | matrix | ) | [inline, static] |
| static void bmtk::FastProject | ( | const T * | F, | |
| const T * | vert, | |||
| T * | coord | |||
| ) | [inline, static] |
| static void bmtk::FastProject | ( | const T * | F, | |
| T | x, | |||
| T | y, | |||
| T | z, | |||
| T & | xout, | |||
| T & | yout, | |||
| T & | zout | |||
| ) | [inline, static] |
| static void bmtk::FastProjectNoZ | ( | const T * | F, | |
| const T * | vert, | |||
| T * | coord | |||
| ) | [inline, static] |
| static void bmtk::FastProjectNoZ | ( | const T * | F, | |
| T | x, | |||
| T | y, | |||
| T | z, | |||
| T & | xout, | |||
| T & | yout | |||
| ) | [inline, static] |
| static void bmtk::FastProjectPrecompute | ( | T * | F, | |
| const T * | P, | |||
| const T * | M, | |||
| const T * | V, | |||
| T | zoffset = 0 | |||
| ) | [inline, static] |
| static void bmtk::FindNormal | ( | const T * | p1, | |
| const T * | p2, | |||
| const T * | p3, | |||
| T * | n | |||
| ) | [inline, static] |
| int bmtk::gelimd | ( | float ** | a, | |
| float * | b, | |||
| float * | x, | |||
| int | n | |||
| ) |
| int bmtk::gelimd2 | ( | float ** | a, | |
| float * | b, | |||
| float * | x, | |||
| int | n | |||
| ) |
| static T bmtk::Len | ( | const T * | x | ) | [inline, static] |
| static T bmtk::Len2 | ( | const T * | x | ) | [inline, static] |
| void bmtk::loadOptions | ( | ) |
Definition at line 744 of file compmesh.cc.
| static void bmtk::MMult | ( | const T * | M1, | |
| const T * | M2, | |||
| T * | Mout | |||
| ) | [inline, static] |
| static void bmtk::Mouse2Q | ( | T | x1, | |
| T | y1, | |||
| T | x2, | |||
| T | y2, | |||
| T * | q | |||
| ) | [inline, static] |
| static void bmtk::Mouse2TrackballPos | ( | T | x, | |
| T | y, | |||
| T * | pos | |||
| ) | [inline, static] |
| static void bmtk::MVMult | ( | const T * | M, | |
| const T * | V, | |||
| T * | Vout, | |||
| bool | apply_trans = true | |||
| ) | [inline, static] |
| void bmtk::myGlutDisplay | ( | void | ) |
Definition at line 653 of file compmesh.cc.
| void bmtk::myGlutIdle | ( | void | ) |
Definition at line 234 of file compmesh.cc.
| void bmtk::myGlutKeyboard | ( | unsigned char | Key, | |
| int | x, | |||
| int | y | |||
| ) |
Definition at line 188 of file compmesh.cc.
| void bmtk::myGlutMenu | ( | int | value | ) |
Definition at line 229 of file compmesh.cc.
| void bmtk::myGlutMotion | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 278 of file compmesh.cc.
| void bmtk::myGlutMouse | ( | int | button, | |
| int | button_state, | |||
| int | x, | |||
| int | y | |||
| ) |
Definition at line 255 of file compmesh.cc.
| void bmtk::myGlutReshape | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 313 of file compmesh.cc.
| static void bmtk::Normalize | ( | T * | v | ) | [inline, static] |
| Vec3d bmtk::operator* | ( | const Vec3d & | v, | |
| const Mat3x3 & | m | |||
| ) |
| Mat3x3 bmtk::operator* | ( | const float | a, | |
| const Mat3x3 & | m | |||
| ) |
| ostream & bmtk::operator<< | ( | ostream & | os, | |
| const Vec3d & | v | |||
| ) |
| ostream & bmtk::operator<< | ( | ostream & | os, | |
| const Mat3x3 & | m | |||
| ) |
| static void bmtk::Project | ( | const T * | P, | |
| const T * | M, | |||
| const T * | V, | |||
| const T * | vert, | |||
| T * | coord, | |||
| T | zoffset = 0 | |||
| ) | [inline, static] |
| static void bmtk::Q2RotAndAxis | ( | const T * | q, | |
| T & | rot, | |||
| T * | rotaxis | |||
| ) | [inline, static] |
| static void bmtk::QCompose | ( | const T * | q1, | |
| const T * | q2, | |||
| T * | q3 | |||
| ) | [inline, static] |
| static void bmtk::QNorm | ( | T * | q | ) | [inline, static] |
| static void bmtk::QRotate | ( | T * | x, | |
| const T * | q | |||
| ) | [inline, static] |
| static void bmtk::RotAndAxis2Q | ( | T | rot, | |
| const T * | rotaxis, | |||
| T * | q | |||
| ) | [inline, static] |
| void bmtk::saveOptions | ( | ) |
Definition at line 701 of file compmesh.cc.
| static T bmtk::sqr | ( | const T & | x | ) | [inline, static] |
| int bmtk::startGUI | ( | Mesh * | m1_, | |
| Mesh * | m2_ | |||
| ) |
| int startGUI | ( | Mesh * | m_ | ) |
Definition at line 1133 of file viewmesh.cc.
| static void bmtk::TriBoundingSphere | ( | const T * | p1, | |
| const T * | p2, | |||
| const T * | p3, | |||
| T * | cent, | |||
| T & | r | |||
| ) | [inline, static] |
| void bmtk::update | ( | ) |
Definition at line 793 of file compmesh.cc.