MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::MeshOrPoints:

Public Member Functions

auto assign_from_another (_other:&meshlib::MeshOrPoints) -> &mut meshlib::MeshOrPoints
auto as_mesh_part () const -> Option<&meshlib::MeshPart >
auto as_point_cloud_part () const -> Option<&meshlib::PointCloudPart >
auto get_obj_bounding_box () const -> meshlib::Box3f
void cache_aabb_tree () const
auto compute_bounding_box (toWorld:Option<&meshlib::AffineXf3f >) const -> meshlib::Box3f
void accumulate (accum:&mut meshlib::PointAccumulator, xf:Option<&meshlib::AffineXf3f >) const
auto points_grid_sampling (voxelSize:f32, maxVoxels:Option< usize >, cb:Option<&meshlib::std_function_bool_from_float >) const -> meshlib::Owned< meshlib::std_optional_MR_VertBitSet >
auto surface_grid_sampling (voxelSize:f32, cloud:&mut meshlib::std_shared_ptr_MR_PointCloud) const -> meshlib::Owned< meshlib::VertBitSet >
auto points () const -> &meshlib::VertCoords
auto valid_points () const -> &meshlib::VertBitSet
auto normals () const -> meshlib::Owned< meshlib::std_function_MR_Vector3f_from_MR_VertId >
auto weights () const -> meshlib::Owned< meshlib::std_function_float_from_MR_VertId >
auto projector () const -> meshlib::Owned< meshlib::std_function_MR_MeshOrPoints_ProjectionResult_from_const_MR_Vector3f_ref >
auto limited_projector () const -> meshlib::Owned< meshlib::std_function_bool_from_const_MR_Vector3f_ref_MR_MeshOrPoints_ProjectionResult_ref >

Static Public Member Functions

static auto construct_from_another (_other:&meshlib::MeshOrPoints) -> meshlib::Owned< meshlib::MeshOrPoints >
static auto construct_mr_mesh_part (mp:&meshlib::MeshPart) -> meshlib::Owned< meshlib::MeshOrPoints >
static auto construct_mr_point_cloud_part (pcp:&meshlib::PointCloudPart) -> meshlib::Owned< meshlib::MeshOrPoints >
static auto construct_mr_mesh (mesh:&meshlib::Mesh) -> meshlib::Owned< meshlib::MeshOrPoints >
static auto construct_mr_point_cloud (pc:&meshlib::PointCloud) -> meshlib::Owned< meshlib::MeshOrPoints >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)
Static Public Member Functions inherited from meshlib::CppCopy
static auto copy (ptr:*const Self) -> *mut Self

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.

Generated from class MR::MeshOrPoints. Heap-allocated instances are held in Owned<MeshOrPoints>.

Member Function Documentation

◆ accumulate()

void meshlib::MeshOrPoints::accumulate ( accum:&mut meshlib::PointAccumulator ,
xf:Option<&meshlib::AffineXf3f >  ) const

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

Calls MR_MeshOrPoints_accumulate().

◆ as_mesh_part()

auto meshlib::MeshOrPoints::as_mesh_part ( ) const -> Option<&meshlib::MeshPart >

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().

◆ as_point_cloud_part()

auto meshlib::MeshOrPoints::as_point_cloud_part ( ) const -> Option<&meshlib::PointCloudPart >

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().

◆ assign_from_another()

auto meshlib::MeshOrPoints::assign_from_another ( _other:&meshlib::MeshOrPoints ) -> &mut meshlib::MeshOrPoints

Generated from method MR::MeshOrPoints::operator=.

Calls MR_MeshOrPoints_AssignFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in this object.

◆ cache_aabb_tree()

void meshlib::MeshOrPoints::cache_aabb_tree ( ) const

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().

◆ compute_bounding_box()

auto meshlib::MeshOrPoints::compute_bounding_box ( toWorld:Option<&meshlib::AffineXf3f > ) const -> meshlib::Box3f

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().

◆ construct_from_another()

auto meshlib::MeshOrPoints::construct_from_another ( _other:&meshlib::MeshOrPoints ) -> meshlib::Owned< meshlib::MeshOrPoints >
static

Generated from constructor MR::MeshOrPoints::MeshOrPoints.

Calls MR_MeshOrPoints_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ construct_mr_mesh()

auto meshlib::MeshOrPoints::construct_mr_mesh ( mesh:&meshlib::Mesh ) -> meshlib::Owned< meshlib::MeshOrPoints >
static

these constructors are redundant for C++, but important for python bindings Generated from constructor MR::MeshOrPoints::MeshOrPoints.

Calls MR_MeshOrPoints_Construct_MR_Mesh(). The reference to the parameter mesh might be preserved in the constructed object.

◆ construct_mr_mesh_part()

auto meshlib::MeshOrPoints::construct_mr_mesh_part ( mp:&meshlib::MeshPart ) -> meshlib::Owned< meshlib::MeshOrPoints >
static

Generated from constructor MR::MeshOrPoints::MeshOrPoints.

Calls MR_MeshOrPoints_Construct_MR_MeshPart(). The reference to the parameter mp might be preserved in the constructed object.

◆ construct_mr_point_cloud()

auto meshlib::MeshOrPoints::construct_mr_point_cloud ( pc:&meshlib::PointCloud ) -> meshlib::Owned< meshlib::MeshOrPoints >
static

Generated from constructor MR::MeshOrPoints::MeshOrPoints.

Calls MR_MeshOrPoints_Construct_MR_PointCloud(). The reference to the parameter pc might be preserved in the constructed object.

◆ construct_mr_point_cloud_part()

auto meshlib::MeshOrPoints::construct_mr_point_cloud_part ( pcp:&meshlib::PointCloudPart ) -> meshlib::Owned< meshlib::MeshOrPoints >
static

Generated from constructor MR::MeshOrPoints::MeshOrPoints.

Calls MR_MeshOrPoints_Construct_MR_PointCloudPart(). The reference to the parameter pcp might be preserved in the constructed object.

◆ get_obj_bounding_box()

auto meshlib::MeshOrPoints::get_obj_bounding_box ( ) const -> meshlib::Box3f

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().

◆ limited_projector()

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()

auto meshlib::MeshOrPoints::normals ( ) const -> meshlib::Owned< meshlib::std_function_MR_Vector3f_from_MR_VertId >

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

Calls MR_MeshOrPoints_normals().

◆ points()

auto meshlib::MeshOrPoints::points ( ) const -> &meshlib::VertCoords

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

Calls MR_MeshOrPoints_points().

◆ points_grid_sampling()

auto meshlib::MeshOrPoints::points_grid_sampling ( voxelSize:f32 ,
maxVoxels:Option< usize > ,
cb:Option<&meshlib::std_function_bool_from_float >  ) const -> meshlib::Owned< meshlib::std_optional_MR_VertBitSet >

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().

◆ surface_grid_sampling()

auto meshlib::MeshOrPoints::surface_grid_sampling ( voxelSize:f32 ,
cloud:&mut meshlib::std_shared_ptr_MR_PointCloud  ) const -> meshlib::Owned< meshlib::VertBitSet >

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().

◆ valid_points()

auto meshlib::MeshOrPoints::valid_points ( ) const -> &meshlib::VertBitSet

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

Calls MR_MeshOrPoints_validPoints().

◆ weights()

auto meshlib::MeshOrPoints::weights ( ) const -> meshlib::Owned< meshlib::std_function_float_from_MR_VertId >

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 struct was generated from the following file: