34 [[nodiscard]]
const VertBitSet &
getVertIds(
const VertBitSet * region )
const
36 assert( !region || region->is_subset_of(
validPoints ) );
74 const VertNormals * extNormals =
nullptr );
#define MRMESH_API
Definition MRMeshFwd.h:80
bounding volume hierarchy for point cloud structure
Definition MRAABBTreePoints.h:16
Definition MRSharedThreadSafeOwner.h:19
Plane3f
Definition MRMeshFwd.h:393
Vector3f normal(const MeshTopology &topology, const VertCoords &points, FaceId f)
computes triangular face normal from its vertices
Definition MRMeshMath.h:224
Reorder
determines how points to be ordered
Definition MREnums.h:26
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
mapping among elements of source point cloud, from which a part is taken, and target (this) point clo...
Definition MRCloudPartMapping.h:13
Definition MRPointCloud.h:17
void transform(const AffineXf3f &xf, const VertBitSet *region=nullptr)
VertCoords points
coordinates of points
Definition MRPointCloud.h:19
VertNormals normals
unit normal directions of points (can be empty if no normals are known)
Definition MRPointCloud.h:22
size_t heapBytes() const
returns the amount of memory this object occupies on heap
Box3f computeBoundingBox(const AffineXf3f *toWorld=nullptr) const
bool hasNormals() const
returns true if there is a normal for each point
Definition MRPointCloud.h:31
Vector3f findCenterFromPoints() const
computes average position of all valid points
void addPartByMask(const PointCloud &from, const VertBitSet &fromVerts, const CloudPartMapping &outMap={}, const VertNormals *extNormals=nullptr)
size_t calcNumValidPoints() const
computes the total number of valid points in the cloud
Definition MRPointCloud.h:28
const VertBitSet & getVertIds(const VertBitSet *region) const
if region pointer is not null then converts it in reference, otherwise returns all valid points in th...
Definition MRPointCloud.h:34
const AABBTreePoints & getAABBTree() const
returns cached aabb-tree for this point cloud, creating it if it did not exist in a thread-safe manne...
VertId addPoint(const Vector3f &point, const Vector3f &normal)
appends a point with normal and returns its VertId
VertId addPoint(const Vector3f &point)
appends a point and returns its VertId
Box3f computeBoundingBox(const VertBitSet *region, const AffineXf3f *toWorld=nullptr) const
Vector3f findCenterFromBBox() const
computes bounding box and returns its center
void flipOrientation(const VertBitSet *region=nullptr)
flip orientation (normals) of given points (or all valid points is nullptr)
VertBitSet validPoints
only points and normals corresponding to set bits here are valid
Definition MRPointCloud.h:25
VertBMap pack(Reorder reoder)
void mirror(const Plane3f &plane)
reflects the points from a given plane
std::vector< VertId > getLexicographicalOrder() const
returns all valid point ids sorted lexicographically by their coordinates (optimal for uniform sampli...
void invalidateCaches()
Invalidates caches (e.g. aabb-tree) after a change in point cloud.
Definition MRPointCloud.h:98
Box3f getBoundingBox() const
returns the minimal bounding box containing all valid vertices (implemented via getAABBTree())
const AABBTreePoints * getAABBTreeNotCreate() const
returns cached aabb-tree for this point cloud, but does not create it if it did not exist
Definition MRPointCloud.h:44
bool pack(VertMap *outNew2Old=nullptr)