All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
SurgSim::DataStructures::AabbTreeIntersectionVisitor Class Reference

Visitor class to collect the items that intersect with a given bounding box. More...

#include <SurgSim/DataStructures/AabbTreeIntersectionVisitor.h>

Inheritance diagram for SurgSim::DataStructures::AabbTreeIntersectionVisitor:
Inheritance graph
[legend]
Collaboration diagram for SurgSim::DataStructures::AabbTreeIntersectionVisitor:
Collaboration graph
[legend]

Public Member Functions

 AabbTreeIntersectionVisitor ()
 Constructor. More...
 
 AabbTreeIntersectionVisitor (const SurgSim::Math::Aabbd &aabb)
 Constructor. More...
 
virtual ~AabbTreeIntersectionVisitor ()
 Destructor. More...
 
virtual bool handle (TreeNode *node) override
 Handle TreeNode basic type. More...
 
virtual bool handle (AabbTreeNode *node) override
 Handle AabbTreeNode basic type, default body, override for specific work. More...
 
bool hasIntersections () const
 
void reset ()
 Resets the data in the tree. More...
 
SurgSim::Math::Aabbd getAabb () const
 
void setAabb (const SurgSim::Math::Aabbd &aabb)
 Sets a new bounding box, will also call reset() More...
 
const std::list< size_t > & getIntersections () const
 
- Public Member Functions inherited from SurgSim::DataStructures::TreeVisitor
virtual ~TreeVisitor ()
 Destructor. More...
 

Private Attributes

std::list< size_t > m_intersections
 List of ids found for intersections. More...
 
SurgSim::Math::Aabbd m_aabb
 Bounding box used for intersection test. More...
 

Detailed Description

Visitor class to collect the items that intersect with a given bounding box.

Constructor & Destructor Documentation

SurgSim::DataStructures::AabbTreeIntersectionVisitor::AabbTreeIntersectionVisitor ( )

Constructor.

SurgSim::DataStructures::AabbTreeIntersectionVisitor::AabbTreeIntersectionVisitor ( const SurgSim::Math::Aabbd aabb)
explicit

Constructor.

Parameters
aabbthe bounding box to be used.
SurgSim::DataStructures::AabbTreeIntersectionVisitor::~AabbTreeIntersectionVisitor ( )
virtual

Destructor.

Member Function Documentation

SurgSim::Math::Aabbd SurgSim::DataStructures::AabbTreeIntersectionVisitor::getAabb ( ) const
Returns
the bounding box to be used for the test.
const std::list< size_t > & SurgSim::DataStructures::AabbTreeIntersectionVisitor::getIntersections ( ) const
Returns
a reference to the found intersections.
bool SurgSim::DataStructures::AabbTreeIntersectionVisitor::handle ( TreeNode node)
overridevirtual

Handle TreeNode basic type.

Parameters
nodeNode to process.
Returns
true To indicates that the visitor wishes to continue traversal, false if the visitor wants to abort traversal.

Implements SurgSim::DataStructures::TreeVisitor.

bool SurgSim::DataStructures::AabbTreeIntersectionVisitor::handle ( AabbTreeNode node)
overridevirtual

Handle AabbTreeNode basic type, default body, override for specific work.

Parameters
nodeNode to process.
Returns
true to continue traversal, false to abort.

Reimplemented from SurgSim::DataStructures::TreeVisitor.

bool SurgSim::DataStructures::AabbTreeIntersectionVisitor::hasIntersections ( ) const
Returns
true if the visitor has found intersections
void SurgSim::DataStructures::AabbTreeIntersectionVisitor::reset ( )

Resets the data in the tree.

void SurgSim::DataStructures::AabbTreeIntersectionVisitor::setAabb ( const SurgSim::Math::Aabbd aabb)

Sets a new bounding box, will also call reset()

Parameters
aabbThe new bounding box.

Member Data Documentation

SurgSim::Math::Aabbd SurgSim::DataStructures::AabbTreeIntersectionVisitor::m_aabb
private

Bounding box used for intersection test.

std::list<size_t> SurgSim::DataStructures::AabbTreeIntersectionVisitor::m_intersections
private

List of ids found for intersections.


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