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

Public Member Functions

 MeshOrPoints (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 MeshOrPoints (meshlib.MeshOrPoints _other)
 MeshOrPoints (meshlib.MeshPart mp)
 MeshOrPoints (meshlib.PointCloudPart pcp)
 MeshOrPoints (meshlib.Mesh mesh)
 MeshOrPoints (meshlib.PointCloud pc)
meshlib.MeshOrPoints assignFromAnother (meshlib.MeshOrPoints _other)
meshlib.MeshPart asMeshPart ()
meshlib.PointCloudPart asPointCloudPart ()
meshlib.Box3f getObjBoundingBox ()
void cacheAABBTree ()
meshlib.Box3f computeBoundingBox (meshlib.AffineXf3f toWorld)
void accumulate (meshlib.PointAccumulator accum, meshlib.AffineXf3f xf)
meshlib.std_optional_MR_VertBitSet pointsGridSampling (float voxelSize, java.lang.Long maxVoxels, meshlib.std_function_bool_from_float cb)
meshlib.VertBitSet surfaceGridSampling (float voxelSize, meshlib.std_shared_ptr_MR_PointCloud cloud)
meshlib.VertCoords points ()
meshlib.VertBitSet validPoints ()
meshlib.std_function_MR_Vector3f_from_MR_VertId normals ()
meshlib.std_function_float_from_MR_VertId weights ()
meshlib.std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref projector ()
meshlib.std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref limitedProjector ()
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

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

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

Constructor & Destructor Documentation

◆ MeshOrPoints() [1/6]

meshlib.MeshOrPoints.MeshOrPoints ( 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.

◆ MeshOrPoints() [2/6]

meshlib.MeshOrPoints.MeshOrPoints ( meshlib.MeshOrPoints _other)

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

Calls MR_MeshOrPoints_ConstructFromAnother().

◆ MeshOrPoints() [3/6]

meshlib.MeshOrPoints.MeshOrPoints ( meshlib.MeshPart mp)

Generated from constructor MR::MeshOrPoints::MeshOrPoints. The reference to the parameter mp might be preserved in the constructed object.

Calls MR_MeshOrPoints_Construct_MR_MeshPart().

◆ MeshOrPoints() [4/6]

meshlib.MeshOrPoints.MeshOrPoints ( meshlib.PointCloudPart pcp)

Generated from constructor MR::MeshOrPoints::MeshOrPoints. The reference to the parameter pcp might be preserved in the constructed object.

Calls MR_MeshOrPoints_Construct_MR_PointCloudPart().

◆ MeshOrPoints() [5/6]

meshlib.MeshOrPoints.MeshOrPoints ( meshlib.Mesh mesh)

these constructors are redundant for C++, but important for python bindings Generated from constructor MR::MeshOrPoints::MeshOrPoints. The reference to the parameter mesh might be preserved in the constructed object.

Calls MR_MeshOrPoints_Construct_MR_Mesh().

◆ MeshOrPoints() [6/6]

meshlib.MeshOrPoints.MeshOrPoints ( meshlib.PointCloud pc)

Generated from constructor MR::MeshOrPoints::MeshOrPoints. The reference to the parameter pc might be preserved in the constructed object.

Calls MR_MeshOrPoints_Construct_MR_PointCloud().

Member Function Documentation

◆ accumulate()

void meshlib.MeshOrPoints.accumulate ( meshlib.PointAccumulator accum,
meshlib.AffineXf3f xf )

Adds in existing PointAccumulator the elements of the contained object Generated from method MR::MeshOrPoints::accumulate.

Calls MR_MeshOrPoints_accumulate().

◆ asMeshPart()

meshlib.MeshPart meshlib.MeshOrPoints.asMeshPart ( )

if this object holds a mesh part then returns pointer on it, otherwise returns nullptr Generated from method MR::MeshOrPoints::asMeshPart.

Calls MR_MeshOrPoints_asMeshPart().

◆ asPointCloudPart()

meshlib.PointCloudPart meshlib.MeshOrPoints.asPointCloudPart ( )

if this object holds a point cloud part then returns pointer on it, otherwise returns nullptr Generated from method MR::MeshOrPoints::asPointCloudPart.

Calls MR_MeshOrPoints_asPointCloudPart().

◆ assignFromAnother()

meshlib.MeshOrPoints meshlib.MeshOrPoints.assignFromAnother ( meshlib.MeshOrPoints _other)

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

Calls MR_MeshOrPoints_AssignFromAnother().

◆ cacheAABBTree()

void meshlib.MeshOrPoints.cacheAABBTree ( )

if the tree used by projections (AABBTree of a mesh, AABBTreePoints of a cloud) is already built does nothing otherwise builds and caches it Generated from method MR::MeshOrPoints::cacheAABBTree.

Calls MR_MeshOrPoints_cacheAABBTree().

◆ computeBoundingBox()

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

passes through all valid vertices 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::MeshOrPoints::computeBoundingBox.

Calls MR_MeshOrPoints_computeBoundingBox().

◆ getObjBoundingBox()

meshlib.Box3f meshlib.MeshOrPoints.getObjBoundingBox ( )

returns the minimal bounding box containing all valid vertices of the object (and not only part of mesh); implemented via obj.getBoundingBox() Generated from method MR::MeshOrPoints::getObjBoundingBox.

Calls MR_MeshOrPoints_getObjBoundingBox().

◆ limitedProjector()

returns a function that updates previously known projection (closest) points on this, the update takes place only if newly found closest point is closer to p than sqrt(res.distSq) given on input The function returns true if the update has taken place. Generated from method MR::MeshOrPoints::limitedProjector.

Calls MR_MeshOrPoints_limitedProjector().

◆ normals()

meshlib.std_function_MR_Vector3f_from_MR_VertId meshlib.MeshOrPoints.normals ( )

returns normals generating function: VertId->normal (or empty for point cloud without normals) Generated from method MR::MeshOrPoints::normals.

Calls MR_MeshOrPoints_normals().

◆ points()

meshlib.VertCoords meshlib.MeshOrPoints.points ( )

gives access to points-vector (which can include invalid points as well) Generated from method MR::MeshOrPoints::points.

Calls MR_MeshOrPoints_points().

◆ pointsGridSampling()

meshlib.std_optional_MR_VertBitSet meshlib.MeshOrPoints.pointsGridSampling ( float voxelSize,
java.lang.Long maxVoxels,
meshlib.std_function_bool_from_float cb )

performs sampling of vertices or points; subdivides bounding box of the object on voxels of approximately given size and returns at most one vertex per voxel; voxelSize is automatically increased to avoid more voxels than

Parameters
maxVoxels;if voxelSize == 0 then all valid points are returned; returns std::nullopt if it was terminated by the callback Generated from method MR::MeshOrPoints::pointsGridSampling.

Calls MR_MeshOrPoints_pointsGridSampling().

◆ projector()

returns a function that finds projection (closest) points on this: Vector3f->ProjectionResult Generated from method MR::MeshOrPoints::projector.

Calls MR_MeshOrPoints_projector().

◆ surfaceGridSampling()

meshlib.VertBitSet meshlib.MeshOrPoints.surfaceGridSampling ( float voxelSize,
meshlib.std_shared_ptr_MR_PointCloud cloud )

performs grid sampling as pointsGridSampling, but a mesh with triangles too big for the sampling is sampled from its dense point cloud (see meshToDensePointCloud) returned in (cloud) with Mesh.pseudonormal in every point, and then the ids refer to the points of that cloud; otherwise (cloud) is reset and the ids refer to the points of this object Generated from method MR::MeshOrPoints::surfaceGridSampling.

Calls MR_MeshOrPoints_surfaceGridSampling().

◆ validPoints()

meshlib.VertBitSet meshlib.MeshOrPoints.validPoints ( )

gives access to bit set of valid points Generated from method MR::MeshOrPoints::validPoints.

Calls MR_MeshOrPoints_validPoints().

◆ weights()

meshlib.std_function_float_from_MR_VertId meshlib.MeshOrPoints.weights ( )

returns weights generating function: VertId->float: for mesh it is double area of surrounding triangles, and for point cloud - nothing Generated from method MR::MeshOrPoints::weights.

Calls MR_MeshOrPoints_weights().


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