OpendTect-6_4  6.4
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DAGTetrahedraTree Class Reference

Delaunay triangulation for 3D points. Should make sure all the points are defined. More...

Classes

struct  DAGTetrahedra
 

Public Member Functions

 DAGTetrahedraTree ()
 
 DAGTetrahedraTree (const DAGTetrahedraTree &)
 
virtual ~DAGTetrahedraTree ()
 
DAGTetrahedraTreeoperator= (const DAGTetrahedraTree &)
 
bool setCoordList (const TypeSet< Coord3 > &, bool copy)
 
const TypeSet< Coord3 > & coordList () const
 
bool init ()
 
void setInitSizeFactor (float)
 
float getInitSizeFactor () const
 
bool isOK () const
 
bool setBBox (const Interval< double > &xrg, const Interval< double > &yrg, const Interval< double > &zrg)
 
bool insertPoint (int pointidx, int &dupid)
 
int insertPoint (const Coord3 &, int &dupid)
 
char locationToTetrahedra (const Coord3 &checkpt, const Coord3 *v, char &face, int &dupididx, int &edgeend0idx, int &edgeend1idx, double &dist) const
 
char searchTetrahedra (const Coord3 &)
 
bool getConnections (int pointidx, TypeSet< int > &) const
 
bool getTetrahedras (TypeSet< int > &) const
 
bool getSurfaceTriangles (TypeSet< int > &) const
 
void setEpsilon (double err)
 

Static Public Member Functions

static bool computeCoordRanges (const TypeSet< Coord3 > &, Interval< double > &xrg, Interval< double > &yrg, Interval< double > &zrg)
 
static char cNoVertex ()
 

Protected Member Functions

void splitInitialBox (int ci)
 
void splitTetrahedraInside (int ci, int ti)
 
void splitTetrahedraOnFace (int ci, int ti0, int ti1, char face)
 
void splitTetrahedraOnEdge (int ci, const TypeSet< int > &tis, int &sharedv0, int &sharedv1)
 
void legalizeTetrahedras (TypeSet< int > &v0s, TypeSet< int > &v1s, TypeSet< int > &v2s, TypeSet< int > &tis)
 
char searchTetrahedra (int ci, int start, TypeSet< int > &tis, char &face, int &sharedv0, int &sharedv1, int &dupid) const
 
int searchFaceOnNeighbor (int a, int b, int c, int ti) const
 
int searchFaceOnChild (int a, int b, int c, int ti) const
 
int searchFaceOnList (int ci, int v0, int v1, int rep, const TypeSet< int > &tis) const
 
char location (int ci, int ti, char &face, int &dupid, int &edgeend0, int &edgeend1, double &dist) const
 
char isOnEdge (const Coord3 &p, const Coord3 &a, const Coord3 &b, const Coord3 planenormal, bool &duponfirst, double &signedsqdist) const
 
char locationToTriangle (const Coord3 &pt, const Coord3 &a, const Coord3 &b, const Coord3 &c, double &signedsqdist, double &closeedgedist, char &dupid, char &edgeidx) const
 
char isIntersect (const Coord3 &p, const Coord3 &q, const Coord3 &a, const Coord3 &b, const Coord3 &c, char &edge) const
 
void addTriangle (int v0, int v1, int v2, TypeSet< int > &triangles) const
 

Static Protected Member Functions

static char cIsInside ()
 
static char cIsOnFace ()
 
static char cIsOnEdge ()
 
static char cEdge01 ()
 
static char cEdge12 ()
 
static char cEdge20 ()
 
static char cIsDuplicate ()
 
static char cIsOutside ()
 
static char cNotOnEdge ()
 
static char cNotOnPlane ()
 
static char cError ()
 
static char cNoTetrahedra ()
 
static char cNoFace ()
 
static char cInitVertex0 ()
 
static char cInitVertex1 ()
 
static char cInitVertex2 ()
 
static char cInitVertex3 ()
 

Protected Attributes

TypeSet< DAGTetrahedratetrahedras_
 
TypeSet< Coord3 > * coordlist_
 
Coord3 center_
 
Coord3 initialcoords_ [4]
 
bool ownscoordlist_
 
double epsilon_
 
float initsizefactor_
 

Detailed Description

Delaunay triangulation for 3D points. Should make sure all the points are defined.

Constructor & Destructor Documentation

DAGTetrahedraTree::DAGTetrahedraTree ( )
DAGTetrahedraTree::DAGTetrahedraTree ( const DAGTetrahedraTree )
virtual DAGTetrahedraTree::~DAGTetrahedraTree ( )
virtual

Member Function Documentation

void DAGTetrahedraTree::addTriangle ( int  v0,
int  v1,
int  v2,
TypeSet< int > &  triangles 
) const
protected

if triangles have {v0,v1,v2}, then return, else, add it.

static char DAGTetrahedraTree::cEdge01 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cEdge12 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cEdge20 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cError ( )
inlinestaticprotected
static char DAGTetrahedraTree::cInitVertex0 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cInitVertex1 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cInitVertex2 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cInitVertex3 ( )
inlinestaticprotected
static char DAGTetrahedraTree::cIsDuplicate ( )
inlinestaticprotected
static char DAGTetrahedraTree::cIsInside ( )
inlinestaticprotected
static char DAGTetrahedraTree::cIsOnEdge ( )
inlinestaticprotected
static char DAGTetrahedraTree::cIsOnFace ( )
inlinestaticprotected
static char DAGTetrahedraTree::cIsOutside ( )
inlinestaticprotected
static char DAGTetrahedraTree::cNoFace ( )
inlinestaticprotected
static char DAGTetrahedraTree::cNoTetrahedra ( )
inlinestaticprotected
static char DAGTetrahedraTree::cNotOnEdge ( )
inlinestaticprotected
static char DAGTetrahedraTree::cNotOnPlane ( )
inlinestaticprotected
static char DAGTetrahedraTree::cNoVertex ( )
inlinestatic
static bool DAGTetrahedraTree::computeCoordRanges ( const TypeSet< Coord3 > &  ,
Interval< double > &  xrg,
Interval< double > &  yrg,
Interval< double > &  zrg 
)
static
const TypeSet<Coord3>& DAGTetrahedraTree::coordList ( ) const
inline
bool DAGTetrahedraTree::getConnections ( int  pointidx,
TypeSet< int > &   
) const
float DAGTetrahedraTree::getInitSizeFactor ( ) const
inline
bool DAGTetrahedraTree::getSurfaceTriangles ( TypeSet< int > &  ) const
bool DAGTetrahedraTree::getTetrahedras ( TypeSet< int > &  ) const
bool DAGTetrahedraTree::init ( )
bool DAGTetrahedraTree::insertPoint ( int  pointidx,
int &  dupid 
)
int DAGTetrahedraTree::insertPoint ( const Coord3 ,
int &  dupid 
)
char DAGTetrahedraTree::isIntersect ( const Coord3 p,
const Coord3 q,
const Coord3 a,
const Coord3 b,
const Coord3 c,
char &  edge 
) const
protected

ret inside, outside, on edge, or duplicate. edge will be defined if pq intersects ABC on edge 0, 1, 2 in order.

bool DAGTetrahedraTree::isOK ( ) const
inline
char DAGTetrahedraTree::isOnEdge ( const Coord3 p,
const Coord3 a,
const Coord3 b,
const Coord3  planenormal,
bool &  duponfirst,
double &  signedsqdist 
) const
protected
void DAGTetrahedraTree::legalizeTetrahedras ( TypeSet< int > &  v0s,
TypeSet< int > &  v1s,
TypeSet< int > &  v2s,
TypeSet< int > &  tis 
)
protected
char DAGTetrahedraTree::location ( int  ci,
int  ti,
char &  face,
int &  dupid,
int &  edgeend0,
int &  edgeend1,
double &  dist 
) const
protected
char DAGTetrahedraTree::locationToTetrahedra ( const Coord3 checkpt,
const Coord3 v,
char &  face,
int &  dupididx,
int &  edgeend0idx,
int &  edgeend1idx,
double &  dist 
) const
char DAGTetrahedraTree::locationToTriangle ( const Coord3 pt,
const Coord3 a,
const Coord3 b,
const Coord3 c,
double &  signedsqdist,
double &  closeedgedist,
char &  dupid,
char &  edgeidx 
) const
protected
DAGTetrahedraTree& DAGTetrahedraTree::operator= ( const DAGTetrahedraTree )
int DAGTetrahedraTree::searchFaceOnChild ( int  a,
int  b,
int  c,
int  ti 
) const
protected
int DAGTetrahedraTree::searchFaceOnList ( int  ci,
int  v0,
int  v1,
int  rep,
const TypeSet< int > &  tis 
) const
protected
int DAGTetrahedraTree::searchFaceOnNeighbor ( int  a,
int  b,
int  c,
int  ti 
) const
protected
char DAGTetrahedraTree::searchTetrahedra ( const Coord3 )
char DAGTetrahedraTree::searchTetrahedra ( int  ci,
int  start,
TypeSet< int > &  tis,
char &  face,
int &  sharedv0,
int &  sharedv1,
int &  dupid 
) const
protected
bool DAGTetrahedraTree::setBBox ( const Interval< double > &  xrg,
const Interval< double > &  yrg,
const Interval< double > &  zrg 
)
bool DAGTetrahedraTree::setCoordList ( const TypeSet< Coord3 > &  ,
bool  copy 
)
void DAGTetrahedraTree::setEpsilon ( double  err)
inline
void DAGTetrahedraTree::setInitSizeFactor ( float  )
void DAGTetrahedraTree::splitInitialBox ( int  ci)
protected
void DAGTetrahedraTree::splitTetrahedraInside ( int  ci,
int  ti 
)
protected
void DAGTetrahedraTree::splitTetrahedraOnEdge ( int  ci,
const TypeSet< int > &  tis,
int &  sharedv0,
int &  sharedv1 
)
protected
void DAGTetrahedraTree::splitTetrahedraOnFace ( int  ci,
int  ti0,
int  ti1,
char  face 
)
protected

Member Data Documentation

Coord3 DAGTetrahedraTree::center_
protected
TypeSet<Coord3>* DAGTetrahedraTree::coordlist_
protected
double DAGTetrahedraTree::epsilon_
protected
Coord3 DAGTetrahedraTree::initialcoords_[4]
protected

-2,-3,-4, -5 are their indices.

float DAGTetrahedraTree::initsizefactor_
protected
bool DAGTetrahedraTree::ownscoordlist_
protected
TypeSet<DAGTetrahedra> DAGTetrahedraTree::tetrahedras_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019