Public Member Functions | Private Attributes | List of all members
lvr2::AABB< T > Class Template Reference

A struct to calculate the Axis Aligned Bounding Box and Average Point of a Point Cloud. More...

#include <AABB.hpp>

Public Member Functions

 AABB ()
 
template<typename P >
 AABB (P *points, size_t count)
 Construct a new AABB object. More...
 
template<typename P >
 AABB (P &points, size_t count)
 Construct a new AABB object. More...
 
template<typename P >
void addPoint (const P &point)
 adds a Point to the Point Cloud More...
 
Vector3< T > avg () const
 Returns the average of all the Points in the Point Cloud. More...
 
size_t count () const
 Returns the number of Points in the Point Cloud. More...
 
difference (int axis) const
 Calculates the size of the Bounding Box along a certain axis. More...
 
int longestAxis () const
 Calculates the axis that has the largest size of the Bounding Box. More...
 
const Vector3< T > & max () const
 Returns the "upper right" Corner of the Bounding Box, as in the largest x, y, z of the Point Cloud. More...
 
const Vector3< T > & min () const
 Returns the "lower left" Corner of the Bounding Box, as in the smallest x, y, z of the Point Cloud. More...
 

Private Attributes

size_t m_count
 
Vector3< T > m_max
 
Vector3< T > m_min
 
Vector3< T > m_sum
 

Detailed Description

template<typename T>
class lvr2::AABB< T >

A struct to calculate the Axis Aligned Bounding Box and Average Point of a Point Cloud.

Definition at line 49 of file AABB.hpp.

Constructor & Destructor Documentation

◆ AABB() [1/3]

template<typename T>
lvr2::AABB< T >::AABB ( )

◆ AABB() [2/3]

template<typename T>
template<typename P >
lvr2::AABB< T >::AABB ( P *  points,
size_t  count 
)
inline

Construct a new AABB object.

Template Parameters
PArray of point representations that support []-based acces to coordinates
Parameters
pointsArray of points
countNumber of points in the point array

Definition at line 67 of file AABB.hpp.

◆ AABB() [3/3]

template<typename T>
template<typename P >
lvr2::AABB< T >::AABB ( P &  points,
size_t  count 
)
inline

Construct a new AABB object.

Template Parameters
PSet of points. Points are accessed via the [] operator. The returned point types must support [] operater access to the coordinates. LVR2's channel object suppoort these requirements
Parameters
pointsSet of point
countNumber of points

Definition at line 85 of file AABB.hpp.

Member Function Documentation

◆ addPoint()

template<typename T>
template<typename P >
void lvr2::AABB< T >::addPoint ( const P &  point)
inline

adds a Point to the Point Cloud

Definition at line 107 of file AABB.hpp.

◆ avg()

template<typename T>
Vector3<T> lvr2::AABB< T >::avg ( ) const

Returns the average of all the Points in the Point Cloud.

◆ count()

template<typename T>
size_t lvr2::AABB< T >::count ( ) const

Returns the number of Points in the Point Cloud.

◆ difference()

template<typename T>
T lvr2::AABB< T >::difference ( int  axis) const

Calculates the size of the Bounding Box along a certain axis.

◆ longestAxis()

template<typename T>
int lvr2::AABB< T >::longestAxis ( ) const

Calculates the axis that has the largest size of the Bounding Box.

◆ max()

template<typename T>
const Vector3<T>& lvr2::AABB< T >::max ( ) const

Returns the "upper right" Corner of the Bounding Box, as in the largest x, y, z of the Point Cloud.

◆ min()

template<typename T>
const Vector3<T>& lvr2::AABB< T >::min ( ) const

Returns the "lower left" Corner of the Bounding Box, as in the smallest x, y, z of the Point Cloud.

Member Data Documentation

◆ m_count

template<typename T>
size_t lvr2::AABB< T >::m_count
private

Definition at line 54 of file AABB.hpp.

◆ m_max

template<typename T>
Vector3<T> lvr2::AABB< T >::m_max
private

Definition at line 52 of file AABB.hpp.

◆ m_min

template<typename T>
Vector3<T> lvr2::AABB< T >::m_min
private

Definition at line 51 of file AABB.hpp.

◆ m_sum

template<typename T>
Vector3<T> lvr2::AABB< T >::m_sum
private

Definition at line 53 of file AABB.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:11