MeshLib C++ Docs
Loading...
Searching...
No Matches
MRBox.h File Reference
#include "MRMacros.h"
#include "MRMeshFwd.h"
#include "MRAffineXf3.h"
#include "MRVectorTraits.h"
#include "MRNextUpDown.h"
#include <algorithm>
#include <cassert>
#include <iosfwd>
#include <limits>
#include <type_traits>

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
 Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

Macros

#define MR_BOX_NO_VECTOR

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>
MinMax< typename Box< V >::T > MR::getTouchPlanes (const Box< V > &box, const V &n)
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
template<typename V>
auto MR::findSortedBoxDims (const Box< V > &box) -> typename VectorTraits< V >::template ChangeBaseType< int >
template<size_t I, typename V>
constexpr const V & MR::get (const Box< V > &box) noexcept
 get<0> returns min, get<1> returns max
template<size_t I, typename V>
constexpr V & MR::get (Box< V > &box) noexcept

Macro Definition Documentation

◆ MR_BOX_NO_VECTOR

#define MR_BOX_NO_VECTOR

MSVC for arm64 vectorizes the loops of Box::include into fmin/fmax, which return NaN of either argument, unlike v < lo ? v : lo https://developercommunity.visualstudio.com/t/MSVC-ARM64-O2-vectorizer-emits-FMIN-wit/11182553