Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

DAGTriangleTree Class Reference

List of all members.

Classes

struct  DAGTriangle

Public Member Functions

 DAGTriangleTree ()
 DAGTriangleTree (const DAGTriangleTree &)
virtual ~DAGTriangleTree ()
DAGTriangleTreeoperator= (const DAGTriangleTree &)
bool setCoordList (const TypeSet< Coord > *OD)
bool setCoordList (TypeSet< Coord > *, OD::PtrPolicy)
const TypeSet< Coord > & coordList () const
bool setBBox (const Interval< double > &xrg, const Interval< double > &yrg)
bool isOK () const
bool init ()
bool insertPoint (int pointidx, int &dupid)
int insertPoint (const Coord &, int &dupid)
const Coord getInitCoord (int vetexidx) const
bool getTriangle (const Coord &, int &dupid, TypeSet< int > &vertexindices) const
bool getCoordIndices (TypeSet< int > &) const
bool getSurroundingIndices (TypeSet< int > &) const
bool getConnections (int pointidx, TypeSet< int > &) const
bool getWeights (int pointidx, const TypeSet< int > &conns, TypeSet< double > &weights, bool normailze=true) const
bool getConnectionAndWeights (int ptidx, TypeSet< int > &conns, TypeSet< double > &weights, bool normailze=true) const
void setEpsilon (double err)
void dumpTo (std::ostream &) const
 Dumps all triangles to stream;.

Static Public Member Functions

static bool computeCoordRanges (const TypeSet< Coord > &, Interval< double > &, Interval< double > &)
static int cNoVertex ()

Protected Member Functions

char getCommonEdge (int ti0, int ti1) const
char searchTriangle (const Coord &pt, int start, int &t0, int &t1, int &dupid) const
char searchFurther (const Coord &pt, int &nti0, int &nti1, int &dupid) const
char searchTriangleOnEdge (const Coord &pt, int ti, int &resti, char &edge, int &did) const
int searchNeighbor (int ti, char edge) const
void splitTriangleInside (int ci, int ti)
void splitTriangleOnEdge (int ci, int ti0, int ti1)
void legalizeTriangles (TypeSet< char > &v0s, TypeSet< char > &v1s, TypeSet< int > &tis)
int getNeighbor (int v0, int v1, int ti) const
int searchChild (int v0, int v1, int ti) const
char isOnEdge (const Coord &p, const Coord &a, const Coord &b, bool &duponfirst, double &signedsqdist) const
char isInside (const Coord &pt, int ti, char &edge, double &disttoedge, int &dupid) const

Static Protected Member Functions

static char cIsOnEdge ()
static char cNotOnEdge ()
static char cIsInside ()
static char cIsDuplicate ()
static char cIsOutside ()
static char cError ()
static int cNoTriangle ()
static int cInitVertex0 ()
static int cInitVertex1 ()
static int cInitVertex2 ()

Protected Attributes

double epsilon_
TypeSet< DAGTriangletriangles_
TypeSet< Coord > * coordlist_
bool ownscoordlist_
bool planedirection_
Coord initialcoords_ [3]

Constructor & Destructor Documentation

DAGTriangleTree::DAGTriangleTree (  ) 
DAGTriangleTree::DAGTriangleTree ( const DAGTriangleTree  ) 
virtual DAGTriangleTree::~DAGTriangleTree (  )  [virtual]

Member Function Documentation

static char DAGTriangleTree::cError (  )  [inline, static, protected]
static int DAGTriangleTree::cInitVertex0 (  )  [inline, static, protected]
static int DAGTriangleTree::cInitVertex1 (  )  [inline, static, protected]
static int DAGTriangleTree::cInitVertex2 (  )  [inline, static, protected]
static char DAGTriangleTree::cIsDuplicate (  )  [inline, static, protected]
static char DAGTriangleTree::cIsInside (  )  [inline, static, protected]
static char DAGTriangleTree::cIsOnEdge (  )  [inline, static, protected]
static char DAGTriangleTree::cIsOutside (  )  [inline, static, protected]
static char DAGTriangleTree::cNotOnEdge (  )  [inline, static, protected]
static int DAGTriangleTree::cNoTriangle (  )  [inline, static, protected]
static int DAGTriangleTree::cNoVertex (  )  [inline, static]
static bool DAGTriangleTree::computeCoordRanges ( const TypeSet< Coord > &  ,
Interval< double > &  ,
Interval< double > &   
) [static]
const TypeSet<Coord>& DAGTriangleTree::coordList (  )  const [inline]
void DAGTriangleTree::dumpTo ( std::ostream &   )  const

Dumps all triangles to stream;.

char DAGTriangleTree::getCommonEdge ( int  ti0,
int  ti1 
) const [protected]
bool DAGTriangleTree::getConnectionAndWeights ( int  ptidx,
TypeSet< int > &  conns,
TypeSet< double > &  weights,
bool  normailze = true 
) const

Calculate inverse distance weight for each conns.

bool DAGTriangleTree::getConnections ( int  pointidx,
TypeSet< int > &   
) const

Points on the edge of the geometry shape.

bool DAGTriangleTree::getCoordIndices ( TypeSet< int > &   )  const

Coord indices are sorted in threes, i.e ci[0], ci[1], ci[2] is the first triangle ci[3], ci[4], ci[5] is the second triangle.

const Coord DAGTriangleTree::getInitCoord ( int  vetexidx  )  const
int DAGTriangleTree::getNeighbor ( int  v0,
int  v1,
int  ti 
) const [protected]

Check neighbor triangle of the edge v0-v1 in ti, where v0, v1 are local vetex indices 0, 1, 2.

bool DAGTriangleTree::getSurroundingIndices ( TypeSet< int > &   )  const
bool DAGTriangleTree::getTriangle ( const Coord ,
int &  dupid,
TypeSet< int > &  vertexindices 
) const

search triangle contains the point.return crds.

bool DAGTriangleTree::getWeights ( int  pointidx,
const TypeSet< int > &  conns,
TypeSet< double > &  weights,
bool  normailze = true 
) const
bool DAGTriangleTree::init (  ) 
int DAGTriangleTree::insertPoint ( const Coord ,
int &  dupid 
)
bool DAGTriangleTree::insertPoint ( int  pointidx,
int &  dupid 
)
char DAGTriangleTree::isInside ( const Coord pt,
int  ti,
char &  edge,
double &  disttoedge,
int &  dupid 
) const [protected]
bool DAGTriangleTree::isOK (  )  const [inline]
char DAGTriangleTree::isOnEdge ( const Coord p,
const Coord a,
const Coord b,
bool &  duponfirst,
double &  signedsqdist 
) const [protected]
void DAGTriangleTree::legalizeTriangles ( TypeSet< char > &  v0s,
TypeSet< char > &  v1s,
TypeSet< int > &  tis 
) [protected]

ci is on the shared edge of triangles ti0, ti1.

DAGTriangleTree& DAGTriangleTree::operator= ( const DAGTriangleTree  ) 
int DAGTriangleTree::searchChild ( int  v0,
int  v1,
int  ti 
) const [protected]
char DAGTriangleTree::searchFurther ( const Coord pt,
int &  nti0,
int &  nti1,
int &  dupid 
) const [protected]
int DAGTriangleTree::searchNeighbor ( int  ti,
char  edge 
) const [protected]
char DAGTriangleTree::searchTriangle ( const Coord pt,
int  start,
int &  t0,
int &  t1,
int &  dupid 
) const [protected]

return the common edge in ti0.

char DAGTriangleTree::searchTriangleOnEdge ( const Coord pt,
int  ti,
int &  resti,
char &  edge,
int &  did 
) const [protected]

assume ci is on the edge of ti.

bool DAGTriangleTree::setBBox ( const Interval< double > &  xrg,
const Interval< double > &  yrg 
)
bool DAGTriangleTree::setCoordList ( TypeSet< Coord > *  ,
OD::PtrPolicy   
)
bool DAGTriangleTree::setCoordList ( const TypeSet< Coord > *  OD  ) 
void DAGTriangleTree::setEpsilon ( double  err  )  [inline]
void DAGTriangleTree::splitTriangleInside ( int  ci,
int  ti 
) [protected]
void DAGTriangleTree::splitTriangleOnEdge ( int  ci,
int  ti0,
int  ti1 
) [protected]

ci is assumed to be inside the triangle ti.


Member Data Documentation

double DAGTriangleTree::epsilon_ [protected]

All triangles have the same sign. -2,-3,-4 are their indices.