MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.PointCloud Class Reference
Inheritance diagram for meshlib.PointCloud:

Public Member Functions

 PointCloud (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 PointCloud ()
 PointCloud (meshlib.PointCloud _other)
meshlib.PointCloud assignFromAnother (meshlib.PointCloud _other)
long calcNumValidPoints ()
boolean hasNormals ()
meshlib.VertBitSet getVertIds (meshlib.VertBitSet region)
meshlib.AABBTreePoints getAABBTree ()
meshlib.AABBTreePoints getAABBTreeNotCreate ()
meshlib.Box3f getBoundingBox ()
meshlib.Box3f computeBoundingBox (meshlib.AffineXf3f toWorld)
meshlib.Box3f computeBoundingBox (meshlib.VertBitSet region, meshlib.AffineXf3f toWorld)
meshlib.Vector3f findCenterFromPoints ()
meshlib.Vector3f findCenterFromBBox ()
void transform (meshlib.AffineXf3f xf, meshlib.VertBitSet region)
meshlib.std_vector_MR_VertId getLexicographicalOrder ()
void addPartByMask (meshlib.PointCloud from, meshlib.VertBitSet fromVerts, meshlib.CloudPartMapping outMap, meshlib.VertCoords extNormals)
meshlib.VertId addPoint (meshlib.Vector3f point)
meshlib.VertId addPoint (meshlib.Vector3f point, meshlib.Vector3f normal)
void mirror (meshlib.Plane3f plane)
void flipOrientation (meshlib.VertBitSet region)
boolean pack (meshlib.VertMap outNew2Old)
meshlib.VertBMap pack (meshlib.Reorder reoder)
void invalidateCaches ()
void updateCaches (meshlib.VertBitSet changedVerts)
long heapBytes ()
meshlib.VertCoords points ()
void setPoints (meshlib.VertCoords value)
meshlib.VertCoords normals ()
void setNormals (meshlib.VertCoords value)
meshlib.VertBitSet validPoints ()
void setValidPoints (meshlib.VertBitSet value)
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

Detailed Description

Generated from class MR::PointCloud.

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ PointCloud() [1/3]

meshlib.PointCloud.PointCloud ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ PointCloud() [2/3]

meshlib.PointCloud.PointCloud ( )

Constructs an empty (default-constructed) instance.

Calls MR_PointCloud_DefaultConstruct().

◆ PointCloud() [3/3]

meshlib.PointCloud.PointCloud ( meshlib.PointCloud _other)

Generated from constructor MR::PointCloud::PointCloud. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

Calls MR_PointCloud_ConstructFromAnother().

Member Function Documentation

◆ addPartByMask()

void meshlib.PointCloud.addPartByMask ( meshlib.PointCloud from,
meshlib.VertBitSet fromVerts,
meshlib.CloudPartMapping outMap,
meshlib.VertCoords extNormals )

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

Parameters
extNormalsif given then they will be copied instead of from.normals Generated from method MR::PointCloud::addPartByMask.

Calls MR_PointCloud_addPartByMask().

◆ addPoint() [1/2]

meshlib.VertId meshlib.PointCloud.addPoint ( meshlib.Vector3f point)

appends a point and returns its VertId Generated from method MR::PointCloud::addPoint.

Calls MR_PointCloud_addPoint().

◆ addPoint() [2/2]

meshlib.VertId meshlib.PointCloud.addPoint ( meshlib.Vector3f point,
meshlib.Vector3f normal )

appends a point with normal and returns its VertId Generated from method MR::PointCloud::addPoint.

Calls MR_PointCloud_addPoint_normal().

◆ assignFromAnother()

meshlib.PointCloud meshlib.PointCloud.assignFromAnother ( meshlib.PointCloud _other)

Generated from method MR::PointCloud::operator=. The reference to things referred to by the parameter _other (if any) might be preserved in this object.

Calls MR_PointCloud_AssignFromAnother().

◆ calcNumValidPoints()

long meshlib.PointCloud.calcNumValidPoints ( )

computes the total number of valid points in the cloud Generated from method MR::PointCloud::calcNumValidPoints.

Calls MR_PointCloud_calcNumValidPoints().

◆ computeBoundingBox() [1/2]

meshlib.Box3f meshlib.PointCloud.computeBoundingBox ( meshlib.AffineXf3f toWorld)

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 Generated from method MR::PointCloud::computeBoundingBox.

Calls MR_PointCloud_computeBoundingBox().

◆ computeBoundingBox() [2/2]

meshlib.Box3f meshlib.PointCloud.computeBoundingBox ( meshlib.VertBitSet region,
meshlib.AffineXf3f toWorld )

passes through all given vertices (or all valid vertices if region == null) and finds the minimal bounding box containing all of them if toWorld transformation is given then returns minimal bounding box in world space Generated from method MR::PointCloud::computeBoundingBox.

Calls MR_PointCloud_computeBoundingBox_region().

◆ findCenterFromBBox()

meshlib.Vector3f meshlib.PointCloud.findCenterFromBBox ( )

computes bounding box and returns its center Generated from method MR::PointCloud::findCenterFromBBox.

Calls MR_PointCloud_findCenterFromBBox().

◆ findCenterFromPoints()

meshlib.Vector3f meshlib.PointCloud.findCenterFromPoints ( )

computes average position of all valid points Generated from method MR::PointCloud::findCenterFromPoints.

Calls MR_PointCloud_findCenterFromPoints().

◆ flipOrientation()

void meshlib.PointCloud.flipOrientation ( meshlib.VertBitSet region)

flip orientation (normals) of given points (or all valid points is nullptr) Generated from method MR::PointCloud::flipOrientation.

Calls MR_PointCloud_flipOrientation().

◆ getAABBTree()

meshlib.AABBTreePoints meshlib.PointCloud.getAABBTree ( )

returns cached aabb-tree for this point cloud, creating it if it did not exist in a thread-safe manner Generated from method MR::PointCloud::getAABBTree.

Calls MR_PointCloud_getAABBTree().

◆ getAABBTreeNotCreate()

meshlib.AABBTreePoints meshlib.PointCloud.getAABBTreeNotCreate ( )

returns cached aabb-tree for this point cloud, but does not create it if it did not exist Generated from method MR::PointCloud::getAABBTreeNotCreate.

Calls MR_PointCloud_getAABBTreeNotCreate().

◆ getBoundingBox()

meshlib.Box3f meshlib.PointCloud.getBoundingBox ( )

returns the minimal bounding box containing all valid vertices (implemented via getAABBTree()) Generated from method MR::PointCloud::getBoundingBox.

Calls MR_PointCloud_getBoundingBox().

◆ getLexicographicalOrder()

meshlib.std_vector_MR_VertId meshlib.PointCloud.getLexicographicalOrder ( )

returns all valid point ids sorted lexicographically by their coordinates (optimal for uniform sampling) Generated from method MR::PointCloud::getLexicographicalOrder.

Calls MR_PointCloud_getLexicographicalOrder().

◆ getVertIds()

meshlib.VertBitSet meshlib.PointCloud.getVertIds ( meshlib.VertBitSet region)

if region pointer is not null then converts it in reference, otherwise returns all valid points in the cloud Generated from method MR::PointCloud::getVertIds.

Calls MR_PointCloud_getVertIds().

◆ hasNormals()

boolean meshlib.PointCloud.hasNormals ( )

returns true if there is a normal for each point Generated from method MR::PointCloud::hasNormals.

Calls MR_PointCloud_hasNormals().

◆ heapBytes()

long meshlib.PointCloud.heapBytes ( )

returns the amount of memory this object occupies on heap Generated from method MR::PointCloud::heapBytes.

Calls MR_PointCloud_heapBytes().

◆ invalidateCaches()

void meshlib.PointCloud.invalidateCaches ( )

Invalidates caches (e.g. aabb-tree) after a change in point cloud Generated from method MR::PointCloud::invalidateCaches.

Calls MR_PointCloud_invalidateCaches().

◆ mirror()

void meshlib.PointCloud.mirror ( meshlib.Plane3f plane)

reflects the points from a given plane Generated from method MR::PointCloud::mirror.

Calls MR_PointCloud_mirror().

◆ normals()

meshlib.VertCoords meshlib.PointCloud.normals ( )

unit normal directions of points (can be empty if no normals are known) Returns a pointer to a member variable of class MR::PointCloud named normals. The reference to this object might be preserved as the return value.

Calls MR_PointCloud_Get_normals().

◆ pack() [1/2]

meshlib.VertBMap meshlib.PointCloud.pack ( meshlib.Reorder reoder)

tightly packs all arrays eliminating invalid points, reorders valid points according to given strategy;

Returns
points mapping: old -> new Generated from method MR::PointCloud::pack.

Calls MR_PointCloud_pack_MR_Reorder().

◆ pack() [2/2]

boolean meshlib.PointCloud.pack ( meshlib.VertMap outNew2Old)

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 Generated from method MR::PointCloud::pack.

Calls MR_PointCloud_pack_MR_VertMap_ptr().

◆ points()

meshlib.VertCoords meshlib.PointCloud.points ( )

coordinates of points Returns a pointer to a member variable of class MR::PointCloud named points. The reference to this object might be preserved as the return value.

Calls MR_PointCloud_Get_points().

◆ setNormals()

void meshlib.PointCloud.setNormals ( meshlib.VertCoords value)

unit normal directions of points (can be empty if no normals are known) Modifies a member variable of class MR::PointCloud named normals. The reference to the parameter value might be preserved in this object in element normals.

Calls MR_PointCloud_Set_normals().

◆ setPoints()

void meshlib.PointCloud.setPoints ( meshlib.VertCoords value)

coordinates of points Modifies a member variable of class MR::PointCloud named points. The reference to the parameter value might be preserved in this object in element points.

Calls MR_PointCloud_Set_points().

◆ setValidPoints()

void meshlib.PointCloud.setValidPoints ( meshlib.VertBitSet value)

only points and normals corresponding to set bits here are valid Modifies a member variable of class MR::PointCloud named validPoints. The reference to the parameter value might be preserved in this object in element validPoints.

Calls MR_PointCloud_Set_validPoints().

◆ transform()

void meshlib.PointCloud.transform ( meshlib.AffineXf3f xf,
meshlib.VertBitSet region )

applies given transformation to specified points and corresponding transformation to their normals if present; if region is nullptr, all valid points are modified Generated from method MR::PointCloud::transform.

Calls MR_PointCloud_transform().

◆ updateCaches()

void meshlib.PointCloud.updateCaches ( meshlib.VertBitSet changedVerts)

updates existing caches in case of few points were changed insignificantly, and validPoints remained unchanged; it shall be considered as a faster alternative to invalidateCaches() and following rebuild of trees

Parameters
changedVertspoints with modified coordinates, nullptr means all valid points Generated from method MR::PointCloud::updateCaches.

Calls MR_PointCloud_updateCaches().

◆ validPoints()

meshlib.VertBitSet meshlib.PointCloud.validPoints ( )

only points and normals corresponding to set bits here are valid Returns a pointer to a member variable of class MR::PointCloud named validPoints. The reference to this object might be preserved as the return value.

Calls MR_PointCloud_Get_validPoints().


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