MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrmeshpy.PointCloud Class Reference

Public Member Functions

None __init__ (self)
 
None __init__ (self, PointCloud arg0)
 
None addPartByMask (self, PointCloud from_, VertBitSet fromVerts, CloudPartMapping outMap='MR::CloudPartMapping{}', VertCoords extNormals=None)
 
VertId addPoint (self, Vector3f point)
 
VertId addPoint (self, Vector3f point, Vector3f normal)
 
int calcNumValidPoints (self)
 
Box3f computeBoundingBox (self, AffineXf3f toWorld=None)
 
Vector3f findCenterFromBBox (self)
 
Vector3f findCenterFromPoints (self)
 
None flipOrientation (self, VertBitSet region=None)
 
AABBTreePoints getAABBTree (self)
 
AABBTreePoints getAABBTreeNotCreate (self)
 
Box3f getBoundingBox (self)
 
std_vector_Id_VertTag getLexicographicalOrder (self)
 
VertBitSet getVertIds (self, VertBitSet region)
 
bool hasNormals (self)
 
int heapBytes (self)
 
None invalidateCaches (self)
 
None mirror (self, Plane3f plane)
 
bool pack (self, VertMap outNew2Old=None)
 
VertBMap pack (self, Reorder reoder)
 
VertCoords normals (self)
 
None normals (self, VertCoords arg1)
 
VertCoords points (self)
 
None points (self, VertCoords arg1)
 
VertBitSet validPoints (self)
 
None validPoints (self, VertBitSet arg1)
 

Detailed Description

Generated from:  MR::PointCloud

\\ingroup PointCloudGroup

Constructor & Destructor Documentation

◆ __init__() [1/2]

None meshlib.mrmeshpy.PointCloud.__init__ ( self)
Implicit default constructor.

◆ __init__() [2/2]

None meshlib.mrmeshpy.PointCloud.__init__ ( self,
PointCloud arg0 )
Implicit copy constructor.

Member Function Documentation

◆ addPartByMask()

None meshlib.mrmeshpy.PointCloud.addPartByMask ( self,
PointCloud from_,
VertBitSet fromVerts,
CloudPartMapping outMap = 'MR::CloudPartMapping{}',
VertCoords extNormals = None )
appends points (and normals if it possible) (from) in addition to this points
if this obj have normals and from obj has not it then don't do anything
\\param extNormals if given then they will be copied instead of from.normals

◆ addPoint() [1/2]

VertId meshlib.mrmeshpy.PointCloud.addPoint ( self,
Vector3f point )
appends a point and returns its VertId

◆ addPoint() [2/2]

VertId meshlib.mrmeshpy.PointCloud.addPoint ( self,
Vector3f point,
Vector3f normal )
appends a point with normal and returns its VertId

◆ calcNumValidPoints()

int meshlib.mrmeshpy.PointCloud.calcNumValidPoints ( self)
computes the total number of valid points in the cloud

◆ computeBoundingBox()

Box3f meshlib.mrmeshpy.PointCloud.computeBoundingBox ( self,
AffineXf3f toWorld = None )
passes through all valid points and finds the minimal bounding box containing all of them;
if toWorld transformation is given then returns minimal bounding box in world space

◆ findCenterFromBBox()

Vector3f meshlib.mrmeshpy.PointCloud.findCenterFromBBox ( self)
computes bounding box and returns its center

◆ findCenterFromPoints()

Vector3f meshlib.mrmeshpy.PointCloud.findCenterFromPoints ( self)
computes average position of all valid points

◆ flipOrientation()

None meshlib.mrmeshpy.PointCloud.flipOrientation ( self,
VertBitSet region = None )
flip orientation (normals) of given points (or all valid points is nullptr)

◆ getAABBTree()

AABBTreePoints meshlib.mrmeshpy.PointCloud.getAABBTree ( self)
returns cached aabb-tree for this point cloud, creating it if it did not exist in a thread-safe manner

◆ getAABBTreeNotCreate()

AABBTreePoints meshlib.mrmeshpy.PointCloud.getAABBTreeNotCreate ( self)
returns cached aabb-tree for this point cloud, but does not create it if it did not exist

◆ getBoundingBox()

Box3f meshlib.mrmeshpy.PointCloud.getBoundingBox ( self)
returns the minimal bounding box containing all valid vertices (implemented via getAABBTree())

◆ getLexicographicalOrder()

std_vector_Id_VertTag meshlib.mrmeshpy.PointCloud.getLexicographicalOrder ( self)
returns all valid point ids sorted lexicographically by their coordinates (optimal for uniform sampling)

◆ getVertIds()

VertBitSet meshlib.mrmeshpy.PointCloud.getVertIds ( self,
VertBitSet region )
if region pointer is not null then converts it in reference, otherwise returns all valid points in the cloud

◆ hasNormals()

bool meshlib.mrmeshpy.PointCloud.hasNormals ( self)
returns true if there is a normal for each point

◆ heapBytes()

int meshlib.mrmeshpy.PointCloud.heapBytes ( self)
returns the amount of memory this object occupies on heap

◆ invalidateCaches()

None meshlib.mrmeshpy.PointCloud.invalidateCaches ( self)
Invalidates caches (e.g. aabb-tree) after a change in point cloud

◆ mirror()

None meshlib.mrmeshpy.PointCloud.mirror ( self,
Plane3f plane )
reflects the points from a given plane

◆ normals() [1/2]

VertCoords meshlib.mrmeshpy.PointCloud.normals ( self)
unit normal directions of points (can be empty if no normals are known)

◆ normals() [2/2]

None meshlib.mrmeshpy.PointCloud.normals ( self,
VertCoords arg1 )

◆ pack() [1/2]

VertBMap meshlib.mrmeshpy.PointCloud.pack ( self,
Reorder reoder )
tightly packs all arrays eliminating invalid points, reorders valid points according to given strategy;
\\return points mapping: old -> new

◆ pack() [2/2]

bool meshlib.mrmeshpy.PointCloud.pack ( self,
VertMap outNew2Old = None )
tightly packs all arrays eliminating invalid points, but relative order of valid points is preserved;
returns false if the cloud was packed before the call and nothing has been changed;
if pack is done optionally returns mappings: new.id -> old.id

◆ points() [1/2]

VertCoords meshlib.mrmeshpy.PointCloud.points ( self)
coordinates of points

◆ points() [2/2]

None meshlib.mrmeshpy.PointCloud.points ( self,
VertCoords arg1 )

◆ validPoints() [1/2]

VertBitSet meshlib.mrmeshpy.PointCloud.validPoints ( self)
only points and normals corresponding to set bits here are valid

◆ validPoints() [2/2]

None meshlib.mrmeshpy.PointCloud.validPoints ( self,
VertBitSet arg1 )

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