An implementation of an Intersection Registration Context for use GQT ray-firing. More...
Public Member Functions | |
GQT_IntRegCtxt (OrientedBoxTreeTool *obbtool, const double ray_point[3], const double ray_dir[3], double tolerance, int min_tolerance_intersections, const EntityHandle *root_set, const EntityHandle *geom_volume, const Tag *sense_tag, const int *desired_orient, const std::vector< EntityHandle > *prev_facets) | |
virtual ErrorCode | register_intersection (EntityHandle set, EntityHandle triangle, double distance, OrientedBoxTreeTool::IntersectSearchWindow &, GeomUtil::intersection_type int_type) |
virtual ErrorCode | update_orient (EntityHandle set, int *surfTriOrient) |
virtual const int * | getDesiredOrient () |
Public Member Functions inherited from moab::OrientedBoxTreeTool::IntRegCtxt | |
std::vector< double > | get_intersections () |
std::vector< EntityHandle > | get_facets () |
std::vector< EntityHandle > | get_sets () |
Private Member Functions | |
void | add_intersection (EntityHandle set, EntityHandle tri, double dist, OrientedBoxTreeTool::IntersectSearchWindow &search_win) |
void | append_intersection (EntityHandle set, EntityHandle facet, double dist) |
void | set_intersection (int len_idx, EntityHandle set, EntityHandle facet, double dist) |
void | add_mode1_intersection (EntityHandle set, EntityHandle facet, double dist, OrientedBoxTreeTool::IntersectSearchWindow &search_win) |
bool | edge_node_piercing_intersect (const EntityHandle tri, const CartVect &ray_direction, const GeomUtil::intersection_type int_type, const std::vector< EntityHandle > &close_tris, const std::vector< int > &close_senses, const Interface *MBI, std::vector< EntityHandle > *neighborhood_tris=0) |
Determine if a ray-edge/node intersection is glancing or piercing. This function avoids asking for upward adjacencies to prevent their creation. More... | |
bool | in_prevFacets (const EntityHandle tri) |
bool | in_neighborhoods (const EntityHandle tri) |
Private Attributes | |
OrientedBoxTreeTool * | tool |
const CartVect | ray_origin |
const CartVect | ray_direction |
const double | tol |
const int | minTolInt |
const EntityHandle * | rootSet |
const EntityHandle * | geomVol |
const Tag * | senseTag |
const int * | desiredOrient |
const std::vector< EntityHandle > * | prevFacets |
std::vector< std::vector< EntityHandle > > | neighborhoods |
std::vector< EntityHandle > | neighborhood |
Additional Inherited Members | |
Protected Attributes inherited from moab::OrientedBoxTreeTool::IntRegCtxt | |
std::vector< double > | intersections |
std::vector< EntityHandle > | sets |
std::vector< EntityHandle > | facets |
An implementation of an Intersection Registration Context for use GQT ray-firing.
This context uses a variety of tests and conditions to confirm whether or not to accumulate an intersection, to ensure robustness for ray firing.
This context only accumulates intersections that are oriented parallel to the 'desiredOrient', if provided, with respect to 'geomVol', using information in the in 'senseTag'.
This context only accumulates a single intersection out of a set of multiple intersections that fall in the same 'neighborhood', where a 'neighborhood' is defined as facets that share edges or vertices.
This context only accumulates piercing intersections. This is relevant for intersections that are found to be on an edge or vertex by the Plucker test. Such intersections are piercing if the ray has the same orientation w.r.t. to all fecets that share that edge or vertex.
This context tests intersections against a list of 'prevFacets' to prevent a ray from crossing the same facet more than once. The user is responsible for ensuring that this list is reset when appropriate.
This context accumulates all intersections within 'tol' of the start of the ray and if the number of intersections within the 'tol' of the ray start point is less than 'minTolInt', the next closest intersection. If the desired result is only the closest intersection, 'minTolInt' should be 0. This function will return all intersections, regardless of distance from the start of the ray, if 'minTolInt' is negative.
Definition at line 123 of file GeomQueryTool.cpp.
|
inline |
|
private |
Definition at line 532 of file GeomQueryTool.cpp.
References add_mode1_intersection(), append_intersection(), moab::OrientedBoxTreeTool::IntRegCtxt::intersections, minTolInt, neighborhood, neighborhoods, set_intersection(), and tol.
Referenced by register_intersection().
|
private |
Definition at line 494 of file GeomQueryTool.cpp.
References moab::OrientedBoxTreeTool::IntRegCtxt::facets, moab::OrientedBoxTreeTool::IntRegCtxt::intersections, set_intersection(), and moab::OrientedBoxTreeTool::IntRegCtxt::sets.
Referenced by add_intersection().
|
private |
Definition at line 472 of file GeomQueryTool.cpp.
References moab::OrientedBoxTreeTool::IntRegCtxt::facets, moab::OrientedBoxTreeTool::IntRegCtxt::intersections, neighborhood, neighborhoods, and moab::OrientedBoxTreeTool::IntRegCtxt::sets.
Referenced by add_intersection().
|
private |
Determine if a ray-edge/node intersection is glancing or piercing. This function avoids asking for upward adjacencies to prevent their creation.
tri | The intersected triangle |
ray_dir | The direction of the ray |
int_type | The type of intersection (EDGE0, EDGE1, NODE2, ...) |
close_tris | Vector of triangles in the proximity of the intersection |
close_senses | Vector of surface senses for tris in the proximity of the intersection |
neighborhood | Vector of triangles in the topological neighborhood of the intersection |
Definition at line 278 of file GeomQueryTool.cpp.
References moab::GeomUtil::EDGE0, moab::GeomUtil::EDGE1, moab::GeomUtil::EDGE2, ErrorCode, MB_CHK_ERR_RET_VAL, MBI, moab::GeomUtil::NODE0, moab::GeomUtil::NODE1, and moab::GeomUtil::NODE2.
Referenced by register_intersection().
|
inlinevirtual |
Reimplemented from moab::OrientedBoxTreeTool::IntRegCtxt.
Definition at line 199 of file GeomQueryTool.cpp.
References desiredOrient.
|
private |
Definition at line 252 of file GeomQueryTool.cpp.
References neighborhoods.
Referenced by register_intersection().
|
private |
Definition at line 247 of file GeomQueryTool.cpp.
References prevFacets.
Referenced by register_intersection().
|
virtual |
Reimplemented from moab::OrientedBoxTreeTool::IntRegCtxt.
Definition at line 422 of file GeomQueryTool.cpp.
References add_intersection(), edge_node_piercing_intersect(), ErrorCode, geomVol, moab::OrientedBoxTreeTool::get_close_tris(), moab::OrientedBoxTreeTool::get_moab_instance(), in_neighborhoods(), in_prevFacets(), moab::GeomUtil::INTERIOR, MB_SUCCESS, neighborhood, ray_direction, ray_origin, rootSet, senseTag, tol, and tool.
|
private |
Definition at line 481 of file GeomQueryTool.cpp.
References moab::OrientedBoxTreeTool::IntRegCtxt::facets, moab::OrientedBoxTreeTool::IntRegCtxt::intersections, and moab::OrientedBoxTreeTool::IntRegCtxt::sets.
Referenced by add_intersection(), and add_mode1_intersection().
|
virtual |
Reimplemented from moab::OrientedBoxTreeTool::IntRegCtxt.
Definition at line 205 of file GeomQueryTool.cpp.
References desiredOrient, ErrorCode, geomVol, moab::OrientedBoxTreeTool::get_moab_instance(), MB_SUCCESS, senseTag, moab::Interface::tag_get_data(), and tool.
|
private |
Definition at line 141 of file GeomQueryTool.cpp.
Referenced by getDesiredOrient(), and update_orient().
|
private |
Definition at line 138 of file GeomQueryTool.cpp.
Referenced by register_intersection(), and update_orient().
|
private |
Definition at line 134 of file GeomQueryTool.cpp.
Referenced by add_intersection().
|
private |
Definition at line 152 of file GeomQueryTool.cpp.
Referenced by add_intersection(), append_intersection(), and register_intersection().
|
private |
Definition at line 151 of file GeomQueryTool.cpp.
Referenced by add_intersection(), append_intersection(), and in_neighborhoods().
|
private |
Definition at line 147 of file GeomQueryTool.cpp.
Referenced by in_prevFacets().
|
private |
Definition at line 130 of file GeomQueryTool.cpp.
Referenced by register_intersection().
|
private |
Definition at line 129 of file GeomQueryTool.cpp.
Referenced by register_intersection().
|
private |
Definition at line 137 of file GeomQueryTool.cpp.
Referenced by register_intersection().
|
private |
Definition at line 139 of file GeomQueryTool.cpp.
Referenced by register_intersection(), and update_orient().
|
private |
Definition at line 131 of file GeomQueryTool.cpp.
Referenced by add_intersection(), and register_intersection().
|
private |
Definition at line 128 of file GeomQueryTool.cpp.
Referenced by register_intersection(), and update_orient().