opensurgsim
Public Member Functions | List of all members
SurgSim::DataStructures::AabbTreeIntersectionVisitor Class Reference

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

#include <AabbTreeIntersectionVisitor.h>

Inheritance diagram for SurgSim::DataStructures::AabbTreeIntersectionVisitor:
SurgSim::DataStructures::TreeVisitor

Public Member Functions

 AabbTreeIntersectionVisitor ()
 Constructor.
 
 AabbTreeIntersectionVisitor (const SurgSim::Math::Aabbd &aabb)
 Constructor. More...
 
virtual ~AabbTreeIntersectionVisitor ()
 Destructor.
 
bool handle (TreeNode *node) override
 Handle TreeNode basic type. More...
 
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.
 
SurgSim::Math::Aabbd getAabb () const
 
void setAabb (const SurgSim::Math::Aabbd &aabb)
 Sets a new bounding box, will also call reset() More...
 
const std::vector< size_t > & getIntersections () const
 
- Public Member Functions inherited from SurgSim::DataStructures::TreeVisitor
virtual ~TreeVisitor ()
 Destructor.
 

Detailed Description

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

Constructor & Destructor Documentation

§ AabbTreeIntersectionVisitor()

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

Constructor.

Parameters
aabbthe bounding box to be used.

Member Function Documentation

§ getAabb()

SurgSim::Math::Aabbd SurgSim::DataStructures::AabbTreeIntersectionVisitor::getAabb ( ) const
Returns
the bounding box to be used for the test.

§ getIntersections()

const std::vector< size_t > & SurgSim::DataStructures::AabbTreeIntersectionVisitor::getIntersections ( ) const
Returns
a reference to the found intersections.

§ handle() [1/2]

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.

§ handle() [2/2]

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.

§ hasIntersections()

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

§ setAabb()

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

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

Parameters
aabbThe new bounding box.

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