MorphoGraphX  2.0-1-227
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
mgx::BoundingBox< N, T > Class Template Reference

#include <BoundingBox.hpp>

Public Types

typedef Vector< N, T > Point
 
typedef std::numeric_limits< T > limits
 

Public Member Functions

CU_HOST_DEVICE BoundingBox ()
 
CU_HOST_DEVICE BoundingBox (const Point &vmin, const Point &vmax)
 
CU_HOST_DEVICE BoundingBox (const BoundingBox &copy)
 
CU_HOST_DEVICE BoundingBox (const Point &p)
 
CU_HOST_DEVICE void reset ()
 
CU_HOST_DEVICE bool empty () const
 
CU_HOST_DEVICE operator bool () const
 
CU_HOST_DEVICE bool operator== (const BoundingBox &other) const
 
CU_HOST_DEVICE bool operator!= (const BoundingBox &other) const
 
CU_HOST_DEVICE Point size () const
 
CU_HOST_DEVICE BoundingBoxoperator&= (const BoundingBox &other)
 Bounding box intersection. More...
 
CU_HOST_DEVICE BoundingBox operator& (const BoundingBox &other) const
 
CU_HOST_DEVICE BoundingBoxoperator*= (const BoundingBox &other)
 
CU_HOST_DEVICE BoundingBox operator* (const BoundingBox &other) const
 
CU_HOST_DEVICE BoundingBoxoperator|= (const BoundingBox &other)
 Bounding box union. More...
 
CU_HOST_DEVICE BoundingBox operator| (const BoundingBox &other) const
 
CU_HOST_DEVICE BoundingBoxoperator+= (const BoundingBox &other)
 
CU_HOST_DEVICE BoundingBox operator+ (const BoundingBox &other) const
 
CU_HOST_DEVICE BoundingBoxoperator|= (const Point &p)
 Adding a point. More...
 
CU_HOST_DEVICE BoundingBox operator| (const Point &p) const
 
const CU_HOST_DEVICE Pointoperator[] (int i) const
 
CU_HOST_DEVICE Pointoperator[] (int i)
 
CU_HOST_DEVICE bool contains (const Point &p) const
 Check if a point is in the BoundingBox. More...
 
CU_HOST_DEVICE Pointdata ()
 
CU_HOST_DEVICE Point pmin ()
 
CU_HOST_DEVICE Point pmin () const
 
CU_HOST_DEVICE Point pmax ()
 
CU_HOST_DEVICE Point pmax () const
 

Public Attributes

Point pts [2]
 

Friends

CU_HOST_DEVICE friend BoundingBox operator& (const Point &p, const BoundingBox &b)
 
CU_HOST_DEVICE friend std::ostream & operator<< (std::ostream &s, const BoundingBox &bbox)
 
CU_HOST_DEVICE friend std::istream & operator>> (std::istream &s, BoundingBox &bbox)
 
QTextStream & operator<< (QTextStream &s, const BoundingBox &bbox)
 
QTextStream & operator>> (QTextStream &s, BoundingBox &bbox)
 

Detailed Description

template<size_t N, typename T>
class mgx::BoundingBox< N, T >

Definition at line 23 of file BoundingBox.hpp.

Member Typedef Documentation

◆ limits

template<size_t N, typename T >
typedef std::numeric_limits<T> mgx::BoundingBox< N, T >::limits

Definition at line 26 of file BoundingBox.hpp.

◆ Point

template<size_t N, typename T >
typedef Vector<N, T> mgx::BoundingBox< N, T >::Point

Definition at line 25 of file BoundingBox.hpp.

Constructor & Destructor Documentation

◆ BoundingBox() [1/4]

template<size_t N, typename T >
CU_HOST_DEVICE mgx::BoundingBox< N, T >::BoundingBox ( )
inline

Definition at line 29 of file BoundingBox.hpp.

◆ BoundingBox() [2/4]

template<size_t N, typename T >
CU_HOST_DEVICE mgx::BoundingBox< N, T >::BoundingBox ( const Point vmin,
const Point vmax 
)
inline

Definition at line 32 of file BoundingBox.hpp.

◆ BoundingBox() [3/4]

template<size_t N, typename T >
CU_HOST_DEVICE mgx::BoundingBox< N, T >::BoundingBox ( const BoundingBox< N, T > &  copy)
inline

Definition at line 39 of file BoundingBox.hpp.

◆ BoundingBox() [4/4]

template<size_t N, typename T >
CU_HOST_DEVICE mgx::BoundingBox< N, T >::BoundingBox ( const Point p)
inline

Definition at line 46 of file BoundingBox.hpp.

Member Function Documentation

◆ contains()

template<size_t N, typename T >
CU_HOST_DEVICE bool mgx::BoundingBox< N, T >::contains ( const Point p) const
inline

Check if a point is in the BoundingBox.

Definition at line 217 of file BoundingBox.hpp.

◆ data()

template<size_t N, typename T >
CU_HOST_DEVICE Point* mgx::BoundingBox< N, T >::data ( )
inline

Definition at line 224 of file BoundingBox.hpp.

◆ empty()

template<size_t N, typename T >
CU_HOST_DEVICE bool mgx::BoundingBox< N, T >::empty ( ) const
inline

Definition at line 65 of file BoundingBox.hpp.

◆ operator bool()

template<size_t N, typename T >
CU_HOST_DEVICE mgx::BoundingBox< N, T >::operator bool ( ) const
inline

Definition at line 74 of file BoundingBox.hpp.

◆ operator!=()

template<size_t N, typename T >
CU_HOST_DEVICE bool mgx::BoundingBox< N, T >::operator!= ( const BoundingBox< N, T > &  other) const
inline

Definition at line 83 of file BoundingBox.hpp.

◆ operator&()

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox mgx::BoundingBox< N, T >::operator& ( const BoundingBox< N, T > &  other) const
inline

Definition at line 109 of file BoundingBox.hpp.

◆ operator&=()

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox& mgx::BoundingBox< N, T >::operator&= ( const BoundingBox< N, T > &  other)
inline

Bounding box intersection.

Definition at line 97 of file BoundingBox.hpp.

◆ operator*()

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox mgx::BoundingBox< N, T >::operator* ( const BoundingBox< N, T > &  other) const
inline

Definition at line 122 of file BoundingBox.hpp.

◆ operator*=()

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox& mgx::BoundingBox< N, T >::operator*= ( const BoundingBox< N, T > &  other)
inline

Definition at line 116 of file BoundingBox.hpp.

◆ operator+()

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox mgx::BoundingBox< N, T >::operator+ ( const BoundingBox< N, T > &  other) const
inline

Definition at line 157 of file BoundingBox.hpp.

◆ operator+=()

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox& mgx::BoundingBox< N, T >::operator+= ( const BoundingBox< N, T > &  other)
inline

Definition at line 151 of file BoundingBox.hpp.

◆ operator==()

template<size_t N, typename T >
CU_HOST_DEVICE bool mgx::BoundingBox< N, T >::operator== ( const BoundingBox< N, T > &  other) const
inline

Definition at line 77 of file BoundingBox.hpp.

◆ operator[]() [1/2]

template<size_t N, typename T >
CU_HOST_DEVICE Point& mgx::BoundingBox< N, T >::operator[] ( int  i)
inline

Definition at line 206 of file BoundingBox.hpp.

◆ operator[]() [2/2]

template<size_t N, typename T >
const CU_HOST_DEVICE Point& mgx::BoundingBox< N, T >::operator[] ( int  i) const
inline

Definition at line 198 of file BoundingBox.hpp.

◆ operator|() [1/2]

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox mgx::BoundingBox< N, T >::operator| ( const BoundingBox< N, T > &  other) const
inline

Definition at line 144 of file BoundingBox.hpp.

◆ operator|() [2/2]

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox mgx::BoundingBox< N, T >::operator| ( const Point p) const
inline

Definition at line 184 of file BoundingBox.hpp.

◆ operator|=() [1/2]

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox& mgx::BoundingBox< N, T >::operator|= ( const BoundingBox< N, T > &  other)
inline

Bounding box union.

Definition at line 132 of file BoundingBox.hpp.

◆ operator|=() [2/2]

template<size_t N, typename T >
CU_HOST_DEVICE BoundingBox& mgx::BoundingBox< N, T >::operator|= ( const Point p)
inline

Adding a point.

Definition at line 167 of file BoundingBox.hpp.

◆ pmax() [1/2]

template<size_t N, typename T >
CU_HOST_DEVICE Point mgx::BoundingBox< N, T >::pmax ( )
inline

Definition at line 239 of file BoundingBox.hpp.

◆ pmax() [2/2]

template<size_t N, typename T >
CU_HOST_DEVICE Point mgx::BoundingBox< N, T >::pmax ( ) const
inline

Definition at line 244 of file BoundingBox.hpp.

◆ pmin() [1/2]

template<size_t N, typename T >
CU_HOST_DEVICE Point mgx::BoundingBox< N, T >::pmin ( )
inline

Definition at line 229 of file BoundingBox.hpp.

◆ pmin() [2/2]

template<size_t N, typename T >
CU_HOST_DEVICE Point mgx::BoundingBox< N, T >::pmin ( ) const
inline

Definition at line 234 of file BoundingBox.hpp.

◆ reset()

template<size_t N, typename T >
CU_HOST_DEVICE void mgx::BoundingBox< N, T >::reset ( )
inline

Definition at line 54 of file BoundingBox.hpp.

◆ size()

template<size_t N, typename T >
CU_HOST_DEVICE Point mgx::BoundingBox< N, T >::size ( ) const
inline

Definition at line 89 of file BoundingBox.hpp.

Friends And Related Function Documentation

◆ operator&

template<size_t N, typename T >
CU_HOST_DEVICE friend BoundingBox operator& ( const Point p,
const BoundingBox< N, T > &  b 
)
friend

Definition at line 191 of file BoundingBox.hpp.

◆ operator<< [1/2]

template<size_t N, typename T >
QTextStream& operator<< ( QTextStream &  s,
const BoundingBox< N, T > &  bbox 
)
friend

Definition at line 265 of file BoundingBox.hpp.

◆ operator<< [2/2]

template<size_t N, typename T >
CU_HOST_DEVICE friend std::ostream& operator<< ( std::ostream &  s,
const BoundingBox< N, T > &  bbox 
)
friend

Definition at line 251 of file BoundingBox.hpp.

◆ operator>> [1/2]

template<size_t N, typename T >
QTextStream& operator>> ( QTextStream &  s,
BoundingBox< N, T > &  bbox 
)
friend

Definition at line 271 of file BoundingBox.hpp.

◆ operator>> [2/2]

template<size_t N, typename T >
CU_HOST_DEVICE friend std::istream& operator>> ( std::istream &  s,
BoundingBox< N, T > &  bbox 
)
friend

Definition at line 258 of file BoundingBox.hpp.

Member Data Documentation

◆ pts

template<size_t N, typename T >
Point mgx::BoundingBox< N, T >::pts[2]

Definition at line 248 of file BoundingBox.hpp.


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