MeshLib C++ Docs
Loading...
Searching...
No Matches

#include <MRMesh/MRMeshOrPoints.h>

Classes

struct  ProjectionResult

Public Types

using LimitedProjectorFunc = std::function<bool( const Vector3f& p, ProjectionResult& res )>

Public Member Functions

 MeshOrPoints (const MeshPart &mp)
 MeshOrPoints (const PointCloudPart &pcp)
 MeshOrPoints (const Mesh &mesh)
 these constructors are redundant for C++, but important for python bindings
 MeshOrPoints (const PointCloud &pc)
const MeshPart * asMeshPart () const
 if this object holds a mesh part then returns pointer on it, otherwise returns nullptr
const PointCloudPartasPointCloudPart () const
 if this object holds a point cloud part then returns pointer on it, otherwise returns nullptr
Box3f getObjBoundingBox () const
void cacheAABBTree () const
 if AABBTree is already built does nothing otherwise builds and caches it
Box3f computeBoundingBox (const AffineXf3f *toWorld=nullptr) const
void accumulate (PointAccumulator &accum, const AffineXf3f *xf=nullptr) const
 Adds in existing PointAccumulator the elements of the contained object.
std::optional< VertBitSet > pointsGridSampling (float voxelSize, size_t maxVoxels=500000, const ProgressCallback &cb={}) const
const VertCoords & points () const
 gives access to points-vector (which can include invalid points as well)
const VertBitSet & validPoints () const
 gives access to bit set of valid points
std::function< Vector3f(VertId)> normals () const
 returns normals generating function: VertId->normal (or empty for point cloud without normals)
std::function< float(VertId)> weights () const
std::function< ProjectionResult(const Vector3f &)> projector () const
 returns a function that finds projection (closest) points on this: Vector3f->ProjectionResult
LimitedProjectorFunc limitedProjector () const

Detailed Description

This class can hold either mesh part or point cloud. It is used for generic algorithms operating with either of them


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