libsurf
Programmer's Documentation

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TTIntersector Class Reference

Detailed Description

Intersect triangle meshes.

See Also
TTIntersection

#include <ttintersector.h>

Collaboration diagram for TTIntersector:
[legend]

Public Member Functions

 TTIntersector ()
 construct empty intersector
 
void addMesh (const MeshComponent &mp)
 add triangle mesh to root node
 
void sortFaces ()
 sort faces to facilitate searching (root node only)
 
uint bsearchFace (const TriFace &f) const
 find index for face f (requires sorting)
 
void updateBox ()
 update root node bounding box when all triangles added
 
uint nfaces () const
 number of triangles in this node
 
uint nisec () const
 number of tri-tri intersection segments collected
 
uint index (uint i) const
 global index of local face i
 
const TriFaceface (uint iglob) const
 access face with global index i
 
bool isLeaf () const
 check if this is a leaf node
 
TTIntersectorleftChild ()
 access the left child node
 
TTIntersectorrightChild ()
 access the right child node
 
bool bbIntersect (const TTIntersector &other) const
 check if this bounding box intersects other's box
 
bool samePatch (const TTIntersector &other) const
 check if this node is exclusively on the same patch as other
 
bool neighborPatch (const TTIntersector &other) const
 check if this node is on a neighbor patch of other
 
void split ()
 split node, create left/right children (not thread-safe)
 
void guardedSplit ()
 test is split is possible, then block and split
 
void ttIntersect (const TTIntersector &other)
 compute intersections with another node, face-by-face
 
void intersect (TTIntersector &other)
 serially compute intersections
 
void mtIntersect (ThreadPool &pool, TTIntersector &other)
 compute all intersections in parallel
 
void enforce (uint itri1, uint itri2, const Vct3 &psrc, const Vct3 &ptrg)
 enforce a segment manually
 
void addLineViz (MeshFields &mvz) const
 generate visualization for debugging
 
void addBoxViz (MeshFields &mvz) const
 visualize leaf boxes for debugging
 
void setComponents (Indices &idx, uint &inext) const
 set identify leafs as components (visu)
 
void collect (TTIntersectionArray &isc) const
 collect child intersections
 

Static Public Member Functions

static uint minFaceCount ()
 minimum number of triangles in node
 
static void minFaceCount (uint c)
 change minimum number of triangles in node
 

Private Member Functions

 TTIntersector (const SharedVector< TriFace > &afaces, const Indices &idx)
 split constructor
 

Private Attributes

SharedVector< TriFacetriangles
 original triangles
 
Indices ifaces
 indices of triangles in this node
 
std::vector< const
MeshComponent * > 
patches
 patches present in this node
 
TTIntersectorPtr mleft
 child nodes
 
TTIntersectorPtr mright
 
TTIntersectionArray allisec
 intersections
 
BndBox bb
 bounding box of this node
 
Mutex guard
 lock the current node for write access
 

Static Private Attributes

static uint min_node_triangles = 16
 split limit
 

The documentation for this class was generated from the following files:
Generated on Wed Jan 19 2022 03:03:19 for libsurf by   doxygen 1.8.5