trase
trase::bbox< T, N > Struct Template Reference

Contains the minimum and maximum extents of a hypercube in D dimensional space. More...

#include <BBox.hpp>

Public Types

using vector_t = Vector< T, N >
 

Public Member Functions

 bbox (const vector_t &p)
 
 bbox (const vector_t &min, const vector_t &max)
 
vector_t delta () const
 
const vector_tmin () const
 
const vector_tmax () const
 
bboxoperator+= (const bbox &arg)
 
bbox operator+ (const bbox &arg)
 
bboxoperator+= (const vector_t &arg)
 
bbox operator+ (const vector_t &arg)
 
bboxoperator*= (const vector_t &arg)
 
bbox operator* (const vector_t &arg) const
 
bool operator< (const bbox &arg)
 
bool operator<= (const bbox &arg)
 
bool is_empty ()
 
vector_t to_coords (const bbox< T, N > &other, vector_t point, bool y_inv=true) const
 given two bboxes representing the same cube in space, convert from one coordinate system to another More...
 

Public Attributes

vector_t bmin
 minimum point in the box (i.e. More...
 
vector_t bmax
 maximum point in the box (i.e. More...
 

Detailed Description

template<typename T, int N>
struct trase::bbox< T, N >

Contains the minimum and maximum extents of a hypercube in D dimensional space.

Template Parameters
Dthe number of spatial dimensions

Member Function Documentation

◆ is_empty()

template<typename T, int N>
bool trase::bbox< T, N >::is_empty ( )
inline
Returns
true if box has no volume

◆ operator*()

template<typename T, int N>
bbox trase::bbox< T, N >::operator* ( const vector_t arg) const
inline
Returns
scale the bounding box

◆ operator*=()

template<typename T, int N>
bbox& trase::bbox< T, N >::operator*= ( const vector_t arg)
inline
Returns
scale the bounding box

◆ operator+() [1/2]

template<typename T, int N>
bbox trase::bbox< T, N >::operator+ ( const bbox< T, N > &  arg)
inline
Returns
the bounding box covering both input boxes

◆ operator+() [2/2]

template<typename T, int N>
bbox trase::bbox< T, N >::operator+ ( const vector_t arg)
inline
Returns
translate the bounding box

◆ operator+=() [1/2]

template<typename T, int N>
bbox& trase::bbox< T, N >::operator+= ( const bbox< T, N > &  arg)
inline
Returns
increase the bounding box to cover both boxes

◆ operator+=() [2/2]

template<typename T, int N>
bbox& trase::bbox< T, N >::operator+= ( const vector_t arg)
inline
Returns
translate the bounding box

◆ operator<()

template<typename T, int N>
bool trase::bbox< T, N >::operator< ( const bbox< T, N > &  arg)
inline
Returns
true if lhs box is within rhs box

◆ operator<=()

template<typename T, int N>
bool trase::bbox< T, N >::operator<= ( const bbox< T, N > &  arg)
inline
Returns
true if lhs box is the same or within rhs box

◆ to_coords()

template<typename T, int N>
vector_t trase::bbox< T, N >::to_coords ( const bbox< T, N > &  other,
vector_t  point,
bool  y_inv = true 
) const
inline

given two bboxes representing the same cube in space, convert from one coordinate system to another

Parameters
otherthe other bbox representing a different coordinate system
pointthe point in this bbox to convert to other's coords
y_invwhether to invert y (e.g. pixel to limits). Default true.
Returns
the new location of point in other's coords

Member Data Documentation

◆ bmax

template<typename T, int N>
vector_t trase::bbox< T, N >::bmax

maximum point in the box (i.e.

upper right corner for D=2)

◆ bmin

template<typename T, int N>
vector_t trase::bbox< T, N >::bmin

minimum point in the box (i.e.

lower left corner for D=2)


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