Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Member Functions | Protected Attributes | Friends
pcl::recognition::BVH< UserData >::Node Class Reference

#include <pcl/recognition/ransac_based/bvh.h>

Public Member Functions

 Node (std::vector< BoundedObject * > &sorted_objects, int first_id, int last_id)
 'sorted_objects' is a sorted vector of bounded objects. More...
 
virtual ~Node ()
 
bool hasChildren () const
 
NodegetLeftChild ()
 
NodegetRightChild ()
 
BoundedObjectgetObject ()
 
bool isLeaf () const
 
bool intersect (const float box[6]) const
 Returns true if 'box' intersects or touches (with a side or a vertex) this node. More...
 
double computeBoundingBoxVolume () const
 Computes and returns the volume of the bounding box of this node. More...
 

Protected Attributes

float bounds_ [6]
 
Nodechildren_ [2]
 
BoundedObjectobject_
 

Friends

class BVH
 

Detailed Description

template<class UserData>
class pcl::recognition::BVH< UserData >::Node

Definition at line 121 of file bvh.h.

Constructor & Destructor Documentation

template<class UserData >
pcl::recognition::BVH< UserData >::Node::Node ( std::vector< BoundedObject * > &  sorted_objects,
int  first_id,
int  last_id 
)
inline

'sorted_objects' is a sorted vector of bounded objects.

It has to be sorted in ascending order according to the objects' x-coordinates. The constructor recursively calls itself with the right 'first_id' and 'last_id' and with the same vector 'sorted_objects'.

Definition at line 127 of file bvh.h.

References pcl::recognition::aux::expandBoundingBox().

template<class UserData >
virtual pcl::recognition::BVH< UserData >::Node::~Node ( )
inlinevirtual

Definition at line 152 of file bvh.h.

Member Function Documentation

template<class UserData >
double pcl::recognition::BVH< UserData >::Node::computeBoundingBoxVolume ( ) const
inline

Computes and returns the volume of the bounding box of this node.

Definition at line 204 of file bvh.h.

template<class UserData >
Node* pcl::recognition::BVH< UserData >::Node::getLeftChild ( )
inline

Definition at line 168 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

template<class UserData >
BoundedObject* pcl::recognition::BVH< UserData >::Node::getObject ( )
inline

Definition at line 180 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

template<class UserData >
Node* pcl::recognition::BVH< UserData >::Node::getRightChild ( )
inline

Definition at line 174 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

template<class UserData >
bool pcl::recognition::BVH< UserData >::Node::hasChildren ( ) const
inline

Definition at line 162 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

template<class UserData >
bool pcl::recognition::BVH< UserData >::Node::intersect ( const float  box[6]) const
inline

Returns true if 'box' intersects or touches (with a side or a vertex) this node.

Definition at line 193 of file bvh.h.

Referenced by pcl::recognition::BVH< UserData >::intersect().

template<class UserData >
bool pcl::recognition::BVH< UserData >::Node::isLeaf ( ) const
inline

Definition at line 186 of file bvh.h.

Friends And Related Function Documentation

template<class UserData >
friend class BVH
friend

Definition at line 209 of file bvh.h.

Member Data Documentation

template<class UserData >
float pcl::recognition::BVH< UserData >::Node::bounds_[6]
protected

Definition at line 212 of file bvh.h.

template<class UserData >
Node* pcl::recognition::BVH< UserData >::Node::children_[2]
protected

Definition at line 213 of file bvh.h.

template<class UserData >
BoundedObject* pcl::recognition::BVH< UserData >::Node::object_
protected

Definition at line 214 of file bvh.h.


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