Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
numeric::geometry::BoundingBox< typename > Class Template Reference

3d axis aligned bounding box class More...

#include <BoundingBox.hh>

Public Types

typedef T PointPosition
 3d point position More...
 

Public Member Functions

 BoundingBox ()=default
 default constructor More...
 
 BoundingBox (PointPosition const &pp)
 point constructor More...
 
 BoundingBox (PointPosition const &lower, PointPosition const &upper)
 corner constructor More...
 
 BoundingBox (BoundingBox const &bb)
 copy constructor More...
 
 ~BoundingBox ()=default
 default destructor More...
 
BoundingBoxoperator= (BoundingBox const &bb)
 copy assignment More...
 
void add (PointPosition const &pp)
 add a point, expands bounds if necessary More...
 
PointPosition const & lower () const
 get lower corner More...
 
PointPosition const & upper () const
 get upper corner More...
 
void set_lower (PointPosition const &p)
 set lower corner More...
 
void set_upper (PointPosition const &p)
 set upper corner More...
 
void reset (PointPosition const &p=PointPosition())
 reset corners More...
 
template<typename U >
void expand (U const &scalar)
 expand box corners (additive) More...
 
template<typename U >
void contract (U const &scalar)
 
void translate (PointPosition const &t)
 translate bounding box More...
 
bool intersects (BoundingBox const &bb) const
 intersects another bounding box? More...
 
template<typename U >
bool contains (U const &x, U const &y, U const &z) const
 is point contained within this bounding box? More...
 
bool contains (PointPosition const &p) const
 is point contained within this bounding box? More...
 

Private Attributes

PointPosition lower_
 
PointPosition upper_
 

Detailed Description

template<typename>
class numeric::geometry::BoundingBox< typename >

3d axis aligned bounding box class

template type must be 3d and have .x(), .y(), .z() accessors

Member Typedef Documentation

template<typename >
typedef T numeric::geometry::BoundingBox< typename >::PointPosition

3d point position

Constructor & Destructor Documentation

template<typename >
numeric::geometry::BoundingBox< typename >::BoundingBox ( )
inlinedefault

default constructor

Warning
no initialization of corners for speed, make sure you reset()
or otherwise set corners before adding points
template<typename >
numeric::geometry::BoundingBox< typename >::BoundingBox ( PointPosition const &  pp)
inline

point constructor

template<typename >
numeric::geometry::BoundingBox< typename >::BoundingBox ( PointPosition const &  lower,
PointPosition const &  upper 
)
inline

corner constructor

template<typename >
numeric::geometry::BoundingBox< typename >::BoundingBox ( BoundingBox< typename > const &  bb)
inline

copy constructor

template<typename >
numeric::geometry::BoundingBox< typename >::~BoundingBox ( )
inlinedefault

default destructor

Member Function Documentation

template<typename >
void numeric::geometry::BoundingBox< typename >::add ( PointPosition const &  pp)
inline

add a point, expands bounds if necessary

Referenced by pyrosetta.bindings.pose.ResidueLabelAccessor::discard().

template<typename >
template<typename U >
bool numeric::geometry::BoundingBox< typename >::contains ( U const &  x,
U const &  y,
U const &  z 
) const
inline
template<typename >
bool numeric::geometry::BoundingBox< typename >::contains ( PointPosition const &  p) const
inline

is point contained within this bounding box?

template<typename >
template<typename U >
void numeric::geometry::BoundingBox< typename >::contract ( U const &  scalar)
inline
template<typename >
template<typename U >
void numeric::geometry::BoundingBox< typename >::expand ( U const &  scalar)
inline

expand box corners (additive)

template<typename >
bool numeric::geometry::BoundingBox< typename >::intersects ( BoundingBox< typename > const &  bb) const
inline

intersects another bounding box?

template<typename >
PointPosition const& numeric::geometry::BoundingBox< typename >::lower ( ) const
inline
template<typename >
BoundingBox& numeric::geometry::BoundingBox< typename >::operator= ( BoundingBox< typename > const &  bb)
inline

copy assignment

template<typename >
void numeric::geometry::BoundingBox< typename >::reset ( PointPosition const &  p = PointPosition())
inline

reset corners

template<typename >
void numeric::geometry::BoundingBox< typename >::set_lower ( PointPosition const &  p)
inline

set lower corner

template<typename >
void numeric::geometry::BoundingBox< typename >::set_upper ( PointPosition const &  p)
inline
template<typename >
void numeric::geometry::BoundingBox< typename >::translate ( PointPosition const &  t)
inline

translate bounding box

template<typename >
PointPosition const& numeric::geometry::BoundingBox< typename >::upper ( ) const
inline

Member Data Documentation

template<typename >
PointPosition numeric::geometry::BoundingBox< typename >::lower_
private
template<typename >
PointPosition numeric::geometry::BoundingBox< typename >::upper_
private

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