ug4
|
traverses a node-tree and intersect a given face with the contained geometry. More...
#include <traverser_intersect_faces.h>
Public Member Functions | |
void | clear_ignore_list () |
clears the ignore list More... | |
const std::vector< CollisionElementID > & | get_intersected_element_ids () const |
void | ignore_element (const CollisionElementID &elemID) |
adds an element to the ignore list More... | |
virtual bool | intersect_tri (const vector3 &v0, const vector3 &v1, const vector3 &v2, SPNode nodeGraph) |
intersects the given triangle with all faces in the given nodeGraph. More... | |
Traverser_IntersectFaces () | |
virtual | ~Traverser_IntersectFaces () |
Protected Member Functions | |
virtual void | handle_boxed_group (BoxedGroupNode *boxedGroup) |
virtual void | handle_collision_triangles (CollisionTrianglesNode *colTrisNode) |
Protected Member Functions inherited from ug::node_tree::Traverser_CollisionTree | |
CollisionTreeRootNode * | get_current_root_node () |
virtual void | handle_collision_edges (CollisionEdgesNode *colEdgesNode) |
virtual void | handle_collision_tree_root (CollisionTreeRootNode *colTreeRootNode) |
Traverser_CollisionTree () | |
virtual | ~Traverser_CollisionTree () |
Protected Member Functions inherited from ug::node_tree::Traverser | |
void | apply (SPNode &node) |
virtual void | handle_group (GroupNode *group) |
template<typename HandlerType > | |
void | register_handler_function (unsigned int oc, HandlerType func) |
void | traverse_object (Object *obj) |
Traverser () | |
virtual | ~Traverser () |
Private Attributes | |
std::vector< CollisionElementID > | m_ignoreList |
std::vector< CollisionElementID > | m_intersectedElementIDs |
int | m_numVrts |
vector3 | m_vrts [4] |
traverses a node-tree and intersect a given face with the contained geometry.
Currently only triangles are supported.
ug::node_tree::Traverser_IntersectFaces::Traverser_IntersectFaces | ( | ) |
|
virtual |
void ug::node_tree::Traverser_IntersectFaces::clear_ignore_list | ( | ) |
clears the ignore list
const std::vector< CollisionElementID > & ug::node_tree::Traverser_IntersectFaces::get_intersected_element_ids | ( | ) | const |
after the intersection with the geometry has been performed, this function returns the ids of the intersected elements.
|
protectedvirtual |
Reimplemented from ug::node_tree::Traverser.
References ug::node_tree::BoxedGroupNode::max_corner(), ug::node_tree::BoxedGroupNode::min_corner(), and ug::TriangleBoxIntersection().
|
protectedvirtual |
Reimplemented from ug::node_tree::Traverser_CollisionTree.
References ug::find(), ug::node_tree::CollisionTreeRootNode::get_points(), ug::node_tree::CollisionTrianglesNode::get_triangle_id(), ug::node_tree::CollisionTrianglesNode::get_triangles(), ug::node_tree::CollisionTrianglesNode::num_triangles(), and ug::TriangleTriangleIntersection().
void ug::node_tree::Traverser_IntersectFaces::ignore_element | ( | const CollisionElementID & | elemID | ) |
adds an element to the ignore list
Make sure that the ignore list won't get too big, since for each it has to be traversed for each triangle that intersects. Use clear_ignore_list to clear the list.
|
virtual |
intersects the given triangle with all faces in the given nodeGraph.
returns true if an intersection was found, false if not. After each run the intersected faces can be accessed using get_intersected_element_ids().
|
private |
|
private |
|
private |
|
private |