MeshLib
 
Loading...
Searching...
No Matches
MR::DenseBox Struct Reference

#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 Box3fbox () const
 return box in its space
 
const AffineXf3fbasisXf () const
 transform box space to world space
 
const AffineXf3fbasisXfInv () const
 transform world space to box space
 

Detailed Description

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

Constructor & Destructor Documentation

◆ DenseBox() [1/5]

MRMESH_API MR::DenseBox::DenseBox ( const std::vector< Vector3f > & points,
const AffineXf3f * xf = nullptr )

Include given points into this dense box.

◆ DenseBox() [2/5]

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.

◆ DenseBox() [3/5]

MRMESH_API MR::DenseBox::DenseBox ( const MeshPart & meshPart,
const AffineXf3f * xf = nullptr )

Include mesh part into this dense box.

◆ DenseBox() [4/5]

MRMESH_API MR::DenseBox::DenseBox ( const PointCloud & points,
const AffineXf3f * xf = nullptr )

Include point into this dense box.

◆ DenseBox() [5/5]

MRMESH_API MR::DenseBox::DenseBox ( const Polyline3 & line,
const AffineXf3f * xf = nullptr )

Include line into this dense box.

Member Function Documentation

◆ basisXf()

const AffineXf3f & MR::DenseBox::basisXf ( ) const
inline

transform box space to world space

◆ basisXfInv()

const AffineXf3f & MR::DenseBox::basisXfInv ( ) const
inline

transform world space to box space

◆ box()

const Box3f & MR::DenseBox::box ( ) const
inline

return box in its space

◆ center()

MRMESH_API Vector3f MR::DenseBox::center ( ) const

returns center of dense box

◆ contains()

MRMESH_API bool MR::DenseBox::contains ( const Vector3f & pt) const

returns true if dense box contains given point

◆ corner()

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


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