MeshLib C++ Docs
Loading...
Searching...
No Matches
MRDenseBox.h
Go to the documentation of this file.
1#pragma once
2#include "MRBox.h"
3#include "MRAffineXf3.h"
4#include "MRBestFit.h"
5#include "MRPointCloud.h"
6
7namespace MR
8{
11
18{
20 MRMESH_API DenseBox( const std::vector<Vector3f>& points, const AffineXf3f* xf = nullptr );
22 MRMESH_API DenseBox( const std::vector<Vector3f>& points, const std::vector<float>& weights, const AffineXf3f* xf = nullptr );
24 MRMESH_API DenseBox( const MeshPart& meshPart, const AffineXf3f* xf = nullptr );
26 MRMESH_API DenseBox( const PointCloud& points, const AffineXf3f* xf = nullptr );
28 MRMESH_API DenseBox( const Polyline3& line, const AffineXf3f* xf = nullptr );
29
31 MRMESH_API Vector3f center() const;
34 MRMESH_API Vector3f corner( const Vector3b& index ) const;
36 MRMESH_API bool contains( const Vector3f& pt ) const;
37
39
41 const Box3f& box() const { return box_; }
43 const AffineXf3f& basisXf() const { return basisXf_; }
45 const AffineXf3f& basisXfInv() const { return basisXfInv_; }
46
47private:
49 void init_( const std::vector<Vector3f>& points, const std::vector<float>* weights = nullptr, const AffineXf3f* xf = nullptr );
51 void init_( const MeshPart& meshPart, const AffineXf3f* xf = nullptr );
53 void init_( const PointCloud& points, const AffineXf3f* xf = nullptr );
55 void init_( const Polyline3& line, const AffineXf3f* xf = nullptr );
56
57 Box3f box_;
58 AffineXf3f basisXf_;
59 AffineXf3f basisXfInv_;
60};
61
62}
const Box3f & box() const
Access members.
Definition MRDenseBox.h:41
const AffineXf3f & basisXfInv() const
transform world space to box space
Definition MRDenseBox.h:45
MRMESH_API DenseBox(const MeshPart &meshPart, const AffineXf3f *xf=nullptr)
Include mesh part into this dense box.
MRMESH_API DenseBox(const std::vector< Vector3f > &points, const AffineXf3f *xf=nullptr)
Include given points into this dense box.
MRMESH_API Vector3f center() const
returns center of dense box
const AffineXf3f & basisXf() const
transform box space to world space
Definition MRDenseBox.h:43
MRMESH_API DenseBox(const Polyline3 &line, const AffineXf3f *xf=nullptr)
Include line 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 bool contains(const Vector3f &pt) const
returns true if dense box contains given point
MRMESH_API Vector3f corner(const Vector3b &index) const
MRMESH_API DenseBox(const PointCloud &points, const AffineXf3f *xf=nullptr)
Include point into this dense box.
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRDenseBox.h:18
Definition MRPointCloud.h:17