#include <MRDenseBox.h>
Public Member Functions | |
| MRMESH_API | DenseBox (const std::vector< Vector3f > &points, const AffineXf3f *xf=nullptr) |
| Include given points into this dense box. | |
| MRMESH_API | DenseBox (const std::vector< Vector3f > &points, const std::vector< float > &weights, const AffineXf3f *xf=nullptr) |
| Include given weighed points into this dense box. | |
| MRMESH_API | DenseBox (const MeshPart &meshPart, const AffineXf3f *xf=nullptr) |
| Include mesh part into this dense box. | |
| MRMESH_API | DenseBox (const PointCloud &points, const AffineXf3f *xf=nullptr) |
| Include point into this dense box. | |
| MRMESH_API | DenseBox (const Polyline3 &line, const AffineXf3f *xf=nullptr) |
| Include line into this dense box. | |
| MRMESH_API Vector3f | center () const |
| returns center of dense box | |
| MRMESH_API Vector3f | corner (const Vector3b &index) const |
| MRMESH_API bool | contains (const Vector3f &pt) const |
| returns true if dense box contains given point | |
| const Box3f & | box () const |
| return box in its space | |
| const AffineXf3f & | basisXf () const |
| transform box space to world space | |
| const AffineXf3f & | basisXfInv () const |
| transform world space to box space | |
Structure to hold and work with dense box
Scalar operations that are not provided in this struct can be called via box() For example box().size(), box().diagonal() or box().volume() Non const operations are not allowed for dense box because it can spoil density
| MRMESH_API MR::DenseBox::DenseBox | ( | const std::vector< Vector3f > & | points, |
| const AffineXf3f * | xf = nullptr ) |
Include given points into this dense box.
| MRMESH_API MR::DenseBox::DenseBox | ( | const std::vector< Vector3f > & | points, |
| const std::vector< float > & | weights, | ||
| const AffineXf3f * | xf = nullptr ) |
Include given weighed points into this dense box.
| MRMESH_API MR::DenseBox::DenseBox | ( | const MeshPart & | meshPart, |
| const AffineXf3f * | xf = nullptr ) |
Include mesh part into this dense box.
| MRMESH_API MR::DenseBox::DenseBox | ( | const PointCloud & | points, |
| const AffineXf3f * | xf = nullptr ) |
Include point into this dense box.
| MRMESH_API MR::DenseBox::DenseBox | ( | const Polyline3 & | line, |
| const AffineXf3f * | xf = nullptr ) |
Include line into this dense box.
|
inline |
transform box space to world space
|
inline |
transform world space to box space
|
inline |
return box in its space
| MRMESH_API Vector3f MR::DenseBox::center | ( | ) | const |
returns center of dense box
| MRMESH_API bool MR::DenseBox::contains | ( | const Vector3f & | pt | ) | const |
returns true if dense box contains given point
| MRMESH_API Vector3f MR::DenseBox::corner | ( | const Vector3b & | index | ) | const |
returns corner of dense box, each index value means: false - min, true - max example: {false, false, flase} - min point, {true, true, true} - max point