MeshLib
 
Loading...
Searching...
No Matches
MRBox.h File Reference
#include "MRMeshFwd.h"
#include "MRAffineXf3.h"
#include <algorithm>
#include <cassert>
#include <limits>

Go to the source code of this file.

Classes

struct  MR::Box< V >
 Box given by its min- and max- corners. More...
 

Namespaces

namespace  MR
 

Functions

template<typename T >
std::array< Vector3< T >, 8 > MR::getCorners (const Box< Vector3< T > > &box)
 returns all corners of given box
 
template<typename T >
std::array< Vector2< T >, 4 > MR::getCorners (const Box< Vector2< T > > &box)
 
template<typename V >
Box< V > MR::transformed (const Box< V > &box, const AffineXf< V > &xf)
 find the tightest box enclosing this one after transformation
 
template<typename V >
Box< V > MR::transformed (const Box< V > &box, const AffineXf< V > *xf)
 this version returns input box as is if pointer to transformation is null
 
template<typename V >
auto MR::width (const Box< V > &box)
 returns size along x axis
 
template<typename V >
auto MR::height (const Box< V > &box)
 returns size along y axis
 
template<typename V >
auto MR::depth (const Box< V > &box)
 returns size along z axis