ug4
|
traverses a node-tree and projects a given point to the contained geometry. More...
#include <traverser_project_point.h>
Public Member Functions | |
CollisionElementID | get_closest_element_id () |
int | get_closest_element_type () |
returns the type of the element to which the closest distance was found. More... | |
vector3 | get_closest_point () |
number | get_distance () |
virtual bool | project (const vector3 &point, SPNode nodeGraph, vector3 *pPointNormal=NULL) |
Traverser_ProjectPoint () | |
virtual | ~Traverser_ProjectPoint () |
Protected Types | |
enum | SearchState { SEARCHING = 0 , FORCE_FIND , GOT_ONE } |
Protected Member Functions | |
virtual void | handle_boxed_group (BoxedGroupNode *boxedGroup) |
virtual void | handle_collision_edges (CollisionEdgesNode *colTrisNode) |
virtual void | handle_collision_triangles (CollisionTrianglesNode *colTrisNode) |
virtual void | handle_group (GroupNode *group) |
Protected Member Functions inherited from ug::node_tree::Traverser_CollisionTree | |
CollisionTreeRootNode * | get_current_root_node () |
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) |
template<typename HandlerType > | |
void | register_handler_function (unsigned int oc, HandlerType func) |
void | traverse_object (Object *obj) |
Traverser () | |
virtual | ~Traverser () |
Protected Attributes | |
vector3 | m_closestPoint |
number | m_distance |
vector3 | m_point |
Private Attributes | |
vector3 | m_boxMax |
vector3 | m_boxMin |
bool | m_checkNormals |
CollisionElementID | m_closestElemID |
int | m_closestElemIndices [3] |
int | m_closestElemType |
CollisionTreeRootNode * | m_closestRootNode |
vector3 | m_pointNormal |
SearchState | m_searchState |
traverses a node-tree and projects a given point to the contained geometry.
|
protected |
ug::node_tree::Traverser_ProjectPoint::Traverser_ProjectPoint | ( | ) |
|
virtual |
CollisionElementID ug::node_tree::Traverser_ProjectPoint::get_closest_element_id | ( | ) |
after the distance of a point to the geometry has been determined, this funtion returns the id of the element closest to the point.
int ug::node_tree::Traverser_ProjectPoint::get_closest_element_type | ( | ) |
returns the type of the element to which the closest distance was found.
0: invalid, 2: edge, 3: triangle
|
inline |
References m_closestPoint.
Referenced by ug::AdjustEdgeLength().
|
inline |
References m_distance.
|
protectedvirtual |
Reimplemented from ug::node_tree::Traverser.
References ug::BoxBoundProbe(), ug::BoxBoxIntersection(), ug::node_tree::BoxedGroupNode::max_corner(), and ug::node_tree::BoxedGroupNode::min_corner().
|
protectedvirtual |
Reimplemented from ug::node_tree::Traverser_CollisionTree.
References ug::DistancePointToLine(), ug::node_tree::CollisionEdgesNode::get_edge_id(), ug::node_tree::CollisionEdgesNode::get_edges(), ug::node_tree::CollisionTreeRootNode::get_points(), ug::node_tree::CollisionEdgesNode::num_edges(), and ug::VecScaleAdd().
|
protectedvirtual |
Reimplemented from ug::node_tree::Traverser_CollisionTree.
References ug::CalculateTriangleNormalNoNormalize(), ug::DistancePointToTriangle(), 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::VecDot().
|
protectedvirtual |
Reimplemented from ug::node_tree::Traverser.
References SmartPtr< T, FreePolicy >::get(), ug::node_tree::GroupNode::get_child(), and ug::node_tree::GroupNode::num_children().
|
virtual |
Referenced by ug::AdjustEdgeLength().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
Referenced by get_closest_point().
|
private |
|
protected |
Referenced by get_distance().
|
protected |
|
private |
|
private |