$search

bmtk Namespace Reference

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< Vector2dVector2dVector
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 ()

Detailed Description

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 Documentation

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.


Function Documentation

void bmtk::controlCB ( int  control  ) 

Definition at line 129 of file compmesh.cc.

template<class T >
static void bmtk::CrossProd ( const T *  x,
const T *  y,
T *  z 
) [inline, static]

Definition at line 101 of file triutil.h.

template<class T >
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]

Definition at line 89 of file triutil.h.

template<class T >
static T bmtk::cube ( const T &  x  )  [inline, static]

Definition at line 37 of file triutil.h.

template<class T >
static T bmtk::Dist ( const T *  x1,
const T *  x2 
) [inline, static]

Definition at line 81 of file triutil.h.

template<class T >
static T bmtk::Dist2 ( const T *  x1,
const T *  x2 
) [inline, static]

Definition at line 69 of file triutil.h.

template<class T >
static T bmtk::Dot ( const T *  x,
const T *  y 
) [inline, static]

Definition at line 45 of file triutil.h.

void bmtk::drawMesh ( void   ) 

Definition at line 327 of file compmesh.cc.

template<class T >
static void bmtk::FastInvert ( T *  matrix  )  [inline, static]

Definition at line 296 of file triutil.h.

template<class T >
static void bmtk::FastProject ( const T *  F,
const T *  vert,
T *  coord 
) [inline, static]

Definition at line 263 of file triutil.h.

template<class T >
static void bmtk::FastProject ( const T *  F,
x,
y,
z,
T &  xout,
T &  yout,
T &  zout 
) [inline, static]

Definition at line 252 of file triutil.h.

template<class T >
static void bmtk::FastProjectNoZ ( const T *  F,
const T *  vert,
T *  coord 
) [inline, static]

Definition at line 285 of file triutil.h.

template<class T >
static void bmtk::FastProjectNoZ ( const T *  F,
x,
y,
z,
T &  xout,
T &  yout 
) [inline, static]

Definition at line 275 of file triutil.h.

template<class T >
static void bmtk::FastProjectPrecompute ( T *  F,
const T *  P,
const T *  M,
const T *  V,
zoffset = 0 
) [inline, static]

Definition at line 216 of file triutil.h.

template<class T >
static void bmtk::FindNormal ( const T *  p1,
const T *  p2,
const T *  p3,
T *  n 
) [inline, static]

Definition at line 112 of file triutil.h.

int bmtk::gelimd ( float **  a,
float *  b,
float *  x,
int  n 
)

Definition at line 16 of file matrix.cc.

int bmtk::gelimd2 ( float **  a,
float *  b,
float *  x,
int  n 
)

Definition at line 56 of file matrix.cc.

template<class T >
static T bmtk::Len ( const T *  x  )  [inline, static]

Definition at line 61 of file triutil.h.

template<class T >
static T bmtk::Len2 ( const T *  x  )  [inline, static]

Definition at line 53 of file triutil.h.

void bmtk::loadOptions (  ) 

Definition at line 744 of file compmesh.cc.

template<class T >
static void bmtk::MMult ( const T *  M1,
const T *  M2,
T *  Mout 
) [inline, static]

Definition at line 142 of file triutil.h.

template<class T >
static void bmtk::Mouse2Q ( x1,
y1,
x2,
y2,
T *  q 
) [inline, static]

Definition at line 463 of file triutil.h.

template<class T >
static void bmtk::Mouse2TrackballPos ( x,
y,
T *  pos 
) [inline, static]

Definition at line 444 of file triutil.h.

template<class T >
static void bmtk::MVMult ( const T *  M,
const T *  V,
T *  Vout,
bool  apply_trans = true 
) [inline, static]

Definition at line 167 of file triutil.h.

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.

template<class T >
static void bmtk::Normalize ( T *  v  )  [inline, static]

Definition at line 124 of file triutil.h.

Vec3d bmtk::operator* ( const float  a,
const Vec3d &  v 
)

Definition at line 197 of file vec3d.cc.

Vec3d bmtk::operator* ( const Vec3d &  v,
const Mat3x3 &  m 
)

Definition at line 181 of file mat3x3.cc.

Mat3x3 bmtk::operator* ( const float  a,
const Mat3x3 &  m 
)

Definition at line 169 of file mat3x3.cc.

void bmtk::operator*= ( Vec3d &  v,
const Mat3x3 &  m 
)

Definition at line 186 of file mat3x3.cc.

Vec3d bmtk::operator+ ( const float  a,
const Vec3d &  v 
)

Definition at line 191 of file vec3d.cc.

Vec3d bmtk::operator- ( const float  a,
const Vec3d &  v 
)

Definition at line 194 of file vec3d.cc.

bool bmtk::operator< ( Edge &  ep,
Face &  fp 
)

Definition at line 64 of file face.cc.

bool bmtk::operator< ( Vert &  vp,
Face &  fp 
)

Definition at line 61 of file face.cc.

bool bmtk::operator< ( Vert &  vp,
Edge &  ep 
)

Definition at line 85 of file edge.cc.

ostream & bmtk::operator<< ( ostream &  os,
const Vert &  v 
)

Definition at line 144 of file vert.cc.

ostream & bmtk::operator<< ( ostream &  os,
const Vec3d &  v 
)

Definition at line 202 of file vec3d.cc.

ostream & bmtk::operator<< ( ostream &  os,
const Mat3x3 &  m 
)

Definition at line 286 of file mat3x3.cc.

ostream & bmtk::operator<< ( ostream &  os,
const Face &  f 
)

Definition at line 70 of file face.cc.

ostream & bmtk::operator<< ( ostream &  os,
const Edge &  e 
)

Definition at line 90 of file edge.cc.

template<class T >
static void bmtk::Project ( const T *  P,
const T *  M,
const T *  V,
const T *  vert,
T *  coord,
zoffset = 0 
) [inline, static]

Definition at line 185 of file triutil.h.

template<class T >
static void bmtk::Q2RotAndAxis ( const T *  q,
T &  rot,
T *  rotaxis 
) [inline, static]

Definition at line 425 of file triutil.h.

template<class T >
static void bmtk::QCompose ( const T *  q1,
const T *  q2,
T *  q3 
) [inline, static]

Definition at line 392 of file triutil.h.

template<class T >
static void bmtk::QNorm ( T *  q  )  [inline, static]

Definition at line 373 of file triutil.h.

template<class T >
static void bmtk::QRotate ( T *  x,
const T *  q 
) [inline, static]

Definition at line 487 of file triutil.h.

template<class T >
static void bmtk::RotAndAxis2Q ( rot,
const T *  rotaxis,
T *  q 
) [inline, static]

Definition at line 409 of file triutil.h.

void bmtk::saveOptions (  ) 

Definition at line 701 of file compmesh.cc.

template<class T >
static T bmtk::sqr ( const T &  x  )  [inline, static]

Definition at line 31 of file triutil.h.

int bmtk::startGUI ( Mesh *  m1_,
Mesh *  m2_ 
)
int startGUI ( Mesh m_  ) 

Definition at line 1133 of file viewmesh.cc.

template<class T >
static void bmtk::TriBoundingSphere ( const T *  p1,
const T *  p2,
const T *  p3,
T *  cent,
T &  r 
) [inline, static]

Definition at line 316 of file triutil.h.

void bmtk::update (  ) 

Definition at line 793 of file compmesh.cc.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


bmtk
Author(s): Benjamin Pitzer
autogenerated on Mon Mar 4 11:05:58 2013