ug4
ug::node_tree::Traverser_ProjectPoint Class Reference

traverses a node-tree and projects a given point to the contained geometry. More...

#include <traverser_project_point.h>

+ Inheritance diagram for ug::node_tree::Traverser_ProjectPoint:

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
CollisionTreeRootNodeget_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
 
CollisionTreeRootNodem_closestRootNode
 
vector3 m_pointNormal
 
SearchState m_searchState
 

Detailed Description

traverses a node-tree and projects a given point to the contained geometry.

Member Enumeration Documentation

◆ SearchState

Enumerator
SEARCHING 
FORCE_FIND 
GOT_ONE 

Constructor & Destructor Documentation

◆ Traverser_ProjectPoint()

ug::node_tree::Traverser_ProjectPoint::Traverser_ProjectPoint ( )

◆ ~Traverser_ProjectPoint()

ug::node_tree::Traverser_ProjectPoint::~Traverser_ProjectPoint ( )
virtual

Member Function Documentation

◆ get_closest_element_id()

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.

◆ get_closest_element_type()

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

◆ get_closest_point()

vector3 ug::node_tree::Traverser_ProjectPoint::get_closest_point ( )
inline

References m_closestPoint.

Referenced by ug::AdjustEdgeLength().

◆ get_distance()

number ug::node_tree::Traverser_ProjectPoint::get_distance ( )
inline

References m_distance.

◆ handle_boxed_group()

void ug::node_tree::Traverser_ProjectPoint::handle_boxed_group ( BoxedGroupNode boxedGroup)
protectedvirtual

◆ handle_collision_edges()

◆ handle_collision_triangles()

◆ handle_group()

void ug::node_tree::Traverser_ProjectPoint::handle_group ( GroupNode group)
protectedvirtual

◆ project()

bool ug::node_tree::Traverser_ProjectPoint::project ( const vector3 point,
SPNode  nodeGraph,
vector3 pPointNormal = NULL 
)
virtual

Referenced by ug::AdjustEdgeLength().

Member Data Documentation

◆ m_boxMax

vector3 ug::node_tree::Traverser_ProjectPoint::m_boxMax
private

◆ m_boxMin

vector3 ug::node_tree::Traverser_ProjectPoint::m_boxMin
private

◆ m_checkNormals

bool ug::node_tree::Traverser_ProjectPoint::m_checkNormals
private

◆ m_closestElemID

CollisionElementID ug::node_tree::Traverser_ProjectPoint::m_closestElemID
private

◆ m_closestElemIndices

int ug::node_tree::Traverser_ProjectPoint::m_closestElemIndices[3]
private

◆ m_closestElemType

int ug::node_tree::Traverser_ProjectPoint::m_closestElemType
private

◆ m_closestPoint

vector3 ug::node_tree::Traverser_ProjectPoint::m_closestPoint
protected

Referenced by get_closest_point().

◆ m_closestRootNode

CollisionTreeRootNode* ug::node_tree::Traverser_ProjectPoint::m_closestRootNode
private

◆ m_distance

number ug::node_tree::Traverser_ProjectPoint::m_distance
protected

Referenced by get_distance().

◆ m_point

vector3 ug::node_tree::Traverser_ProjectPoint::m_point
protected

◆ m_pointNormal

vector3 ug::node_tree::Traverser_ProjectPoint::m_pointNormal
private

◆ m_searchState

SearchState ug::node_tree::Traverser_ProjectPoint::m_searchState
private

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