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

Public Member Functions

auto assign_from_another (_other:&meshlib::PointCloud) -> &mut meshlib::PointCloud
auto calc_num_valid_points () const -> usize
auto has_normals () const -> bool
auto get_vert_ids (region:Option<&meshlib::VertBitSet >) const -> &meshlib::VertBitSet
auto get_aabb_tree () const -> &meshlib::AABBTreePoints
auto get_aabb_tree_not_create () const -> Option<&meshlib::AABBTreePoints >
auto get_bounding_box () const -> meshlib::Box3f
auto compute_bounding_box (toWorld:Option<&meshlib::AffineXf3f >) const -> meshlib::Box3f
auto compute_bounding_box_region (region:Option<&meshlib::VertBitSet >, toWorld:Option<&meshlib::AffineXf3f >) const -> meshlib::Box3f
auto find_center_from_points () const -> meshlib::Vector3f
auto find_center_from_b_box () const -> meshlib::Vector3f
void transform (xf:&meshlib::AffineXf3f, region:Option<&meshlib::VertBitSet >)
auto get_lexicographical_order () const -> meshlib::Owned< meshlib::std_vector_MR_VertId >
void add_part_by_mask (from:&meshlib::PointCloud, fromVerts:&meshlib::VertBitSet, outMap:Option<&meshlib::CloudPartMapping >, extNormals:Option<&meshlib::VertCoords >)
auto add_point (point:&meshlib::Vector3f) -> meshlib::VertId
auto add_point_normal (point:&meshlib::Vector3f, normal:&meshlib::Vector3f) -> meshlib::VertId
void mirror (plane:&meshlib::Plane3f)
void flip_orientation (region:Option<&meshlib::VertBitSet >)
auto pack_mr_vert_map_ptr (outNew2Old:Option<&mut meshlib::VertMap >) -> bool
auto pack_mr_reorder (reoder:meshlib::Reorder) -> meshlib::Owned< meshlib::VertBMap >
void invalidate_caches ()
void update_caches (changedVerts:Option<&meshlib::VertBitSet >)
auto heap_bytes () const -> usize
auto points () const -> &meshlib::VertCoords
auto points_mut () -> &mut meshlib::VertCoords
void set_points (value:&meshlib::VertCoords)
auto normals () const -> &meshlib::VertCoords
auto normals_mut () -> &mut meshlib::VertCoords
void set_normals (value:&meshlib::VertCoords)
auto valid_points () const -> &meshlib::VertBitSet
auto valid_points_mut () -> &mut meshlib::VertBitSet
void set_valid_points (value:&meshlib::VertBitSet)

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::PointCloud >
static auto construct_from_another (_other:&meshlib::PointCloud) -> meshlib::Owned< meshlib::PointCloud >
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

Generated from class MR::PointCloud.

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

Member Function Documentation

◆ add_part_by_mask()

void meshlib::PointCloud::add_part_by_mask ( from:&meshlib::PointCloud ,
fromVerts:&meshlib::VertBitSet ,
outMap:Option<&meshlib::CloudPartMapping > ,
extNormals:Option<&meshlib::VertCoords >  )

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

◆ add_point()

auto meshlib::PointCloud::add_point ( point:&meshlib::Vector3f ) -> meshlib::VertId

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

Calls MR_PointCloud_addPoint().

◆ add_point_normal()

auto meshlib::PointCloud::add_point_normal ( point:&meshlib::Vector3f ,
normal:&meshlib::Vector3f  ) -> meshlib::VertId

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

Calls MR_PointCloud_addPoint_normal().

◆ assign_from_another()

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

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

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

◆ calc_num_valid_points()

auto meshlib::PointCloud::calc_num_valid_points ( ) const -> usize

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

Calls MR_PointCloud_calcNumValidPoints().

◆ compute_bounding_box()

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

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

◆ compute_bounding_box_region()

auto meshlib::PointCloud::compute_bounding_box_region ( region:Option<&meshlib::VertBitSet > ,
toWorld:Option<&meshlib::AffineXf3f >  ) const -> meshlib::Box3f

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

◆ construct_from_another()

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

Generated from constructor MR::PointCloud::PointCloud.

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

◆ find_center_from_b_box()

auto meshlib::PointCloud::find_center_from_b_box ( ) const -> meshlib::Vector3f

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

Calls MR_PointCloud_findCenterFromBBox().

◆ find_center_from_points()

auto meshlib::PointCloud::find_center_from_points ( ) const -> meshlib::Vector3f

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

Calls MR_PointCloud_findCenterFromPoints().

◆ flip_orientation()

void meshlib::PointCloud::flip_orientation ( region:Option<&meshlib::VertBitSet > )

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

Calls MR_PointCloud_flipOrientation().

◆ get_aabb_tree()

auto meshlib::PointCloud::get_aabb_tree ( ) const -> &meshlib::AABBTreePoints

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

◆ get_aabb_tree_not_create()

auto meshlib::PointCloud::get_aabb_tree_not_create ( ) const -> Option<&meshlib::AABBTreePoints >

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

◆ get_bounding_box()

auto meshlib::PointCloud::get_bounding_box ( ) const -> meshlib::Box3f

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

Calls MR_PointCloud_getBoundingBox().

◆ get_lexicographical_order()

auto meshlib::PointCloud::get_lexicographical_order ( ) const -> meshlib::Owned< meshlib::std_vector_MR_VertId >

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

Calls MR_PointCloud_getLexicographicalOrder().

◆ get_vert_ids()

auto meshlib::PointCloud::get_vert_ids ( region:Option<&meshlib::VertBitSet > ) const -> &meshlib::VertBitSet

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

◆ has_normals()

auto meshlib::PointCloud::has_normals ( ) const -> bool

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

Calls MR_PointCloud_hasNormals().

◆ heap_bytes()

auto meshlib::PointCloud::heap_bytes ( ) const -> usize

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

Calls MR_PointCloud_heapBytes().

◆ invalidate_caches()

void meshlib::PointCloud::invalidate_caches ( )

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 ( plane:&meshlib::Plane3f )

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

Calls MR_PointCloud_mirror().

◆ new()

auto meshlib::PointCloud::new ( ) -> meshlib::Owned< meshlib::PointCloud >
static

Constructs an empty (default-constructed) instance.

Calls MR_PointCloud_DefaultConstruct().

◆ normals()

auto meshlib::PointCloud::normals ( ) const -> &meshlib::VertCoords

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.

Calls MR_PointCloud_Get_normals(). The reference to this object might be preserved as the return value.

◆ normals_mut()

auto meshlib::PointCloud::normals_mut ( ) -> &mut meshlib::VertCoords

unit normal directions of points (can be empty if no normals are known) Returns a mutable pointer to a member variable of class MR::PointCloud named normals.

Calls MR_PointCloud_GetMutable_normals(). The reference to this object might be preserved as the return value.

◆ pack_mr_reorder()

auto meshlib::PointCloud::pack_mr_reorder ( reoder:meshlib::Reorder ) -> meshlib::Owned< meshlib::VertBMap >

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

auto meshlib::PointCloud::pack_mr_vert_map_ptr ( outNew2Old:Option<&mut meshlib::VertMap > ) -> bool

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

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

coordinates of points Returns a pointer to a member variable of class MR::PointCloud named points.

Calls MR_PointCloud_Get_points(). The reference to this object might be preserved as the return value.

◆ points_mut()

auto meshlib::PointCloud::points_mut ( ) -> &mut meshlib::VertCoords

coordinates of points Returns a mutable pointer to a member variable of class MR::PointCloud named points.

Calls MR_PointCloud_GetMutable_points(). The reference to this object might be preserved as the return value.

◆ set_normals()

void meshlib::PointCloud::set_normals ( value:&meshlib::VertCoords )

unit normal directions of points (can be empty if no normals are known) Modifies a member variable of class MR::PointCloud named normals.

Calls MR_PointCloud_Set_normals(). The reference to the parameter value might be preserved in this object in element normals.

◆ set_points()

void meshlib::PointCloud::set_points ( value:&meshlib::VertCoords )

coordinates of points Modifies a member variable of class MR::PointCloud named points.

Calls MR_PointCloud_Set_points(). The reference to the parameter value might be preserved in this object in element points.

◆ set_valid_points()

void meshlib::PointCloud::set_valid_points ( value:&meshlib::VertBitSet )

only points and normals corresponding to set bits here are valid Modifies a member variable of class MR::PointCloud named validPoints.

Calls MR_PointCloud_Set_validPoints(). The reference to the parameter value might be preserved in this object in element validPoints.

◆ transform()

void meshlib::PointCloud::transform ( xf:&meshlib::AffineXf3f ,
region:Option<&meshlib::VertBitSet >  )

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

◆ update_caches()

void meshlib::PointCloud::update_caches ( changedVerts:Option<&meshlib::VertBitSet > )

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

◆ valid_points()

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

only points and normals corresponding to set bits here are valid Returns a pointer to a member variable of class MR::PointCloud named validPoints.

Calls MR_PointCloud_Get_validPoints(). The reference to this object might be preserved as the return value.

◆ valid_points_mut()

auto meshlib::PointCloud::valid_points_mut ( ) -> &mut meshlib::VertBitSet

only points and normals corresponding to set bits here are valid Returns a mutable pointer to a member variable of class MR::PointCloud named validPoints.

Calls MR_PointCloud_GetMutable_validPoints(). The reference to this object might be preserved as the return value.


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