Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
moab::FindVolumeIntRegCtxt Class Reference
+ Inheritance diagram for moab::FindVolumeIntRegCtxt:
+ Collaboration diagram for moab::FindVolumeIntRegCtxt:

Public Member Functions

 FindVolumeIntRegCtxt ()
 
ErrorCode register_intersection (EntityHandle set, EntityHandle tri, double dist, OrientedBoxTreeTool::IntersectSearchWindow &search_win, GeomUtil::intersection_type)
 
- Public Member Functions inherited from moab::OrientedBoxTreeTool::IntRegCtxt
virtual ErrorCode update_orient (EntityHandle, int *)
 
virtual const int * getDesiredOrient ()
 
std::vector< double > get_intersections ()
 
std::vector< EntityHandleget_facets ()
 
std::vector< EntityHandleget_sets ()
 

Public Attributes

double pos
 
double neg
 

Additional Inherited Members

- Protected Attributes inherited from moab::OrientedBoxTreeTool::IntRegCtxt
std::vector< double > intersections
 
std::vector< EntityHandlesets
 
std::vector< EntityHandlefacets
 

Detailed Description

Definition at line 45 of file GeomQueryTool.cpp.

Constructor & Destructor Documentation

◆ FindVolumeIntRegCtxt()

moab::FindVolumeIntRegCtxt::FindVolumeIntRegCtxt ( )
inline

Definition at line 50 of file GeomQueryTool.cpp.

51  {
52  // initialize return vectors
53  // only one hit is returned in this context
54  intersections.push_back( std::numeric_limits< double >::max() );
55  sets.push_back( 0 );
56  facets.push_back( 0 );
57  }

References moab::OrientedBoxTreeTool::IntRegCtxt::facets, moab::OrientedBoxTreeTool::IntRegCtxt::intersections, and moab::OrientedBoxTreeTool::IntRegCtxt::sets.

Member Function Documentation

◆ register_intersection()

ErrorCode moab::FindVolumeIntRegCtxt::register_intersection ( EntityHandle  set,
EntityHandle  tri,
double  dist,
OrientedBoxTreeTool::IntersectSearchWindow search_win,
GeomUtil::intersection_type   
)
inlinevirtual

Reimplemented from moab::OrientedBoxTreeTool::IntRegCtxt.

Definition at line 59 of file GeomQueryTool.cpp.

64  {
65  // update dist, set, and triangle hit if
66  // we found a new minimum distance
67  double abs_dist = fabs( dist );
68  if( abs_dist < fabs( intersections[0] ) )
69  {
70  intersections[0] = dist;
71  sets[0] = set;
72  facets[0] = tri;
73 
74  // narrow search window based on the hit distance
75  pos = abs_dist;
76  neg = -abs_dist;
77  search_win.first = &pos;
78  search_win.second = &neg;
79  }
80 
81  return MB_SUCCESS;
82  }

References moab::OrientedBoxTreeTool::IntRegCtxt::facets, moab::OrientedBoxTreeTool::IntRegCtxt::intersections, MB_SUCCESS, neg, pos, and moab::OrientedBoxTreeTool::IntRegCtxt::sets.

Member Data Documentation

◆ neg

double moab::FindVolumeIntRegCtxt::neg

Definition at line 86 of file GeomQueryTool.cpp.

Referenced by register_intersection().

◆ pos

double moab::FindVolumeIntRegCtxt::pos

Definition at line 85 of file GeomQueryTool.cpp.

Referenced by register_intersection().


The documentation for this class was generated from the following file: