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

Public Member Functions

auto assign_from_another (_other:&meshlib::DistanceMap) -> &mut meshlib::DistanceMap
auto is_valid_2 (x:usize, y:usize) const -> bool
auto is_valid_1 (i:usize) const -> bool
auto is_in_bounds_2 (x:usize, y:usize) const -> bool
auto is_in_bounds_1 (i:usize) const -> bool
auto get_2 (x:usize, y:usize) const -> meshlib::Owned< meshlib::std_optional_float >
auto get_1 (i:usize) const -> meshlib::Owned< meshlib::std_optional_float >
auto get_value_mut_2 (x:usize, y:usize) -> &mut f32
auto get_value_2 (x:usize, y:usize) const -> f32
auto get_value_mut_1 (i:usize) -> &mut f32
auto get_value_1 (i:usize) const -> f32
auto data_mut () -> Option<&mut f32 >
auto data () const -> Option<&f32 >
auto get_interpolated (x:f32, y:f32) const -> meshlib::Owned< meshlib::std_optional_float >
 finds interpolated value.
auto unproject (x:usize, y:usize, toWorld:&meshlib::AffineXf3f) const -> meshlib::Owned< meshlib::std_optional_MR_Vector3f >
auto unproject_interpolated (x:f32, y:f32, toWorld:&meshlib::AffineXf3f) const -> meshlib::Owned< meshlib::std_optional_MR_Vector3f >
 finds 3d coordinates of the Point on the model surface for the (x,y) interpolated value
void negate ()
auto max (rhs:&meshlib::DistanceMap) const -> meshlib::Owned< meshlib::DistanceMap >
auto merge_max (rhs:&meshlib::DistanceMap) -> &meshlib::DistanceMap
auto min (rhs:&meshlib::DistanceMap) const -> meshlib::Owned< meshlib::DistanceMap >
auto merge_min (rhs:&meshlib::DistanceMap) -> &meshlib::DistanceMap
auto op_sub (rhs:&meshlib::DistanceMap) const -> meshlib::Owned< meshlib::DistanceMap >
auto sub_assign (rhs:&meshlib::DistanceMap) -> &meshlib::DistanceMap
void set_3 (x:usize, y:usize, val:f32)
void set_2 (i:usize, val:f32)
void set_1 (data:&meshlib::std_vector_float)
void unset_2 (x:usize, y:usize)
void unset_1 (i:usize)
void invalidate_all ()
void clear ()
auto get_derivative_map () const -> meshlib::Owned< meshlib::DistanceMap >
auto get_xy_derivative_maps () const -> meshlib::Owned< meshlib::std_pair_MR_DistanceMap_MR_DistanceMap >
auto get_local_maximums () const -> meshlib::Owned< meshlib::std_vector_std_pair_size_t_size_t >
auto res_x () const -> usize
auto res_y () const -> usize
auto num_points () const -> usize
auto get_min_max_values () const -> meshlib::Owned< meshlib::std_pair_float_float >
auto get_min_index () const -> meshlib::Owned< meshlib::std_pair_size_t_size_t >
auto get_max_index () const -> meshlib::Owned< meshlib::std_pair_size_t_size_t >
auto heap_bytes () const -> usize
void resize (dims:&meshlib::Vector2i)
auto dims () const -> &meshlib::Vector2i
auto size () const -> usize
auto to_pixel_id (pos:&meshlib::Vector2i) const -> meshlib::PixelId
auto to_index (pos:&meshlib::Vector2i) const -> usize
auto upcast_to_rect_indexer () const -> &meshlib::RectIndexer
auto upcast_to_rect_indexer_mut () -> &mut meshlib::RectIndexer

Static Public Member Functions

static auto new () -> meshlib::Owned< meshlib::DistanceMap >
static auto construct_from_another (_other:&meshlib::DistanceMap) -> meshlib::Owned< meshlib::DistanceMap >
static auto construct_2 (resX:usize, resY:usize) -> meshlib::Owned< meshlib::DistanceMap >
static auto construct_1 (m:&meshlib::Matrix_float) -> meshlib::Owned< meshlib::DistanceMap >
static auto not_valid_value () -> *const f32
static auto static_downcast_from_rect_indexer (object:&meshlib::RectIndexer) -> &Self
static auto static_downcast_from_rect_indexer_mut (object:&mut meshlib::RectIndexer) -> &mut Self
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 allows to store distances from the plane in particular pixels validVerts keeps only pixels with mesh-intersecting rays from them Generated from class MR::DistanceMap. Base classes: Direct: (non-virtual) MR::RectIndexer

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

Member Function Documentation

◆ assign_from_another()

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

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

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

◆ clear()

void meshlib::DistanceMap::clear ( )

clears data, sets resolutions to zero Generated from method MR::DistanceMap::clear.

Calls MR_DistanceMap_clear().

◆ construct_1()

auto meshlib::DistanceMap::construct_1 ( m:&meshlib::Matrix_float ) -> meshlib::Owned< meshlib::DistanceMap >
static

make from 2d array Generated from constructor MR::DistanceMap::DistanceMap.

Calls MR_DistanceMap_Construct_1(). The reference to the parameter m might be preserved in the constructed object.

◆ construct_2()

auto meshlib::DistanceMap::construct_2 ( resX:usize ,
resY:usize  ) -> meshlib::Owned< meshlib::DistanceMap >
static

Preferable constructor with resolution arguments Access by the index (i) is equal to (y*resX + x) Generated from constructor MR::DistanceMap::DistanceMap.

Calls MR_DistanceMap_Construct_2(). The reference to the parameter resX might be preserved in the constructed object. The reference to the parameter resY might be preserved in the constructed object.

◆ construct_from_another()

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

Generated from constructor MR::DistanceMap::DistanceMap.

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

◆ data()

auto meshlib::DistanceMap::data ( ) const -> Option<&f32 >

Generated from method MR::DistanceMap::data.

Calls MR_DistanceMap_data().

◆ data_mut()

auto meshlib::DistanceMap::data_mut ( ) -> Option<&mut f32 >

Generated from method MR::DistanceMap::data.

Calls MR_DistanceMap_data_mut().

◆ dims()

auto meshlib::DistanceMap::dims ( ) const -> &meshlib::Vector2i

Generated from method MR::DistanceMap::dims.

Calls MR_DistanceMap_dims().

◆ get_1()

auto meshlib::DistanceMap::get_1 ( i:usize ) const -> meshlib::Owned< meshlib::std_optional_float >

returns value of index element, returns nullopt if not valid (see isValid()), UB if out of bounds. Generated from method MR::DistanceMap::get.

Calls MR_DistanceMap_get_1().

◆ get_2()

auto meshlib::DistanceMap::get_2 ( x:usize ,
y:usize  ) const -> meshlib::Owned< meshlib::std_optional_float >

returns value in (X,Y) element, returns nullopt if not valid (see isValid()), UB if out of bounds. Generated from method MR::DistanceMap::get.

Calls MR_DistanceMap_get_2().

◆ get_derivative_map()

auto meshlib::DistanceMap::get_derivative_map ( ) const -> meshlib::Owned< meshlib::DistanceMap >

returns new derivatives map without directions Generated from method MR::DistanceMap::getDerivativeMap.

Calls MR_DistanceMap_getDerivativeMap().

◆ get_interpolated()

auto meshlib::DistanceMap::get_interpolated ( x:f32 ,
y:f32  ) const -> meshlib::Owned< meshlib::std_optional_float >

finds interpolated value.

https://en.wikipedia.org/wiki/Bilinear_interpolation getInterpolated( 0.5f, 0.5f ) == get( 0, 0 ) see https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-coordinates for details all 4 elements around this point should be valid, returns nullopt if at least one is not valid

Parameters
x,yshould be in resolution range [0;resX][0;resY]. If x,y are out of bounds, returns nullopt.

Generated from method MR::DistanceMap::getInterpolated.

Calls MR_DistanceMap_getInterpolated().

◆ get_local_maximums()

auto meshlib::DistanceMap::get_local_maximums ( ) const -> meshlib::Owned< meshlib::std_vector_std_pair_size_t_size_t >

computes single derivative map from XY spaces combined. Returns local maximums then Generated from method MR::DistanceMap::getLocalMaximums.

Calls MR_DistanceMap_getLocalMaximums().

◆ get_max_index()

auto meshlib::DistanceMap::get_max_index ( ) const -> meshlib::Owned< meshlib::std_pair_size_t_size_t >

finds maximum value X,Y returns [-1.-1] if all values are invalid Generated from method MR::DistanceMap::getMaxIndex.

Calls MR_DistanceMap_getMaxIndex().

◆ get_min_index()

auto meshlib::DistanceMap::get_min_index ( ) const -> meshlib::Owned< meshlib::std_pair_size_t_size_t >

finds minimum value X,Y returns [-1.-1] if all values are invalid Generated from method MR::DistanceMap::getMinIndex.

Calls MR_DistanceMap_getMinIndex().

◆ get_min_max_values()

auto meshlib::DistanceMap::get_min_max_values ( ) const -> meshlib::Owned< meshlib::std_pair_float_float >

finds minimum and maximum values returns min_float and max_float if all values are invalid Generated from method MR::DistanceMap::getMinMaxValues.

Calls MR_DistanceMap_getMinMaxValues().

◆ get_value_1()

auto meshlib::DistanceMap::get_value_1 ( i:usize ) const -> f32

Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_1().

◆ get_value_2()

auto meshlib::DistanceMap::get_value_2 ( x:usize ,
y:usize  ) const -> f32

Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_2().

◆ get_value_mut_1()

auto meshlib::DistanceMap::get_value_mut_1 ( i:usize ) -> &mut f32

Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_mut_1().

◆ get_value_mut_2()

auto meshlib::DistanceMap::get_value_mut_2 ( x:usize ,
y:usize  ) -> &mut f32

returns value in (X,Y) element without check on valid use this only if you sure that distance map has no invalid values or for serialization Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_mut_2().

◆ get_xy_derivative_maps()

auto meshlib::DistanceMap::get_xy_derivative_maps ( ) const -> meshlib::Owned< meshlib::std_pair_MR_DistanceMap_MR_DistanceMap >

returns new derivative maps with X and Y axes direction Generated from method MR::DistanceMap::getXYDerivativeMaps.

Calls MR_DistanceMap_getXYDerivativeMaps().

◆ heap_bytes()

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

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

Calls MR_DistanceMap_heapBytes().

◆ invalidate_all()

void meshlib::DistanceMap::invalidate_all ( )

invalidates all elements Generated from method MR::DistanceMap::invalidateAll.

Calls MR_DistanceMap_invalidateAll().

◆ is_in_bounds_1()

auto meshlib::DistanceMap::is_in_bounds_1 ( i:usize ) const -> bool

Returns true if a flattened coordinate is in bounds. Generated from method MR::DistanceMap::isInBounds.

Calls MR_DistanceMap_isInBounds_1().

◆ is_in_bounds_2()

auto meshlib::DistanceMap::is_in_bounds_2 ( x:usize ,
y:usize  ) const -> bool

Returns true if (X,Y) coordinates are in bounds. Generated from method MR::DistanceMap::isInBounds.

Calls MR_DistanceMap_isInBounds_2().

◆ is_valid_1()

auto meshlib::DistanceMap::is_valid_1 ( i:usize ) const -> bool

checks if index element is valid (i.e. not NOT_VALID_VALUE; passing an invalid coord to this is UB) Generated from method MR::DistanceMap::isValid.

Calls MR_DistanceMap_isValid_1().

◆ is_valid_2()

auto meshlib::DistanceMap::is_valid_2 ( x:usize ,
y:usize  ) const -> bool

checks if X,Y element is valid (i.e. not NOT_VALID_VALUE; passing invalid coords to this is UB) Generated from method MR::DistanceMap::isValid.

Calls MR_DistanceMap_isValid_2().

◆ max()

auto meshlib::DistanceMap::max ( rhs:&meshlib::DistanceMap ) const -> meshlib::Owned< meshlib::DistanceMap >

boolean operators returns new Distance Map with cell-wise maximum values. Invalid values remain only if both corresponding cells are invalid Generated from method MR::DistanceMap::max.

Calls MR_DistanceMap_max().

◆ merge_max()

auto meshlib::DistanceMap::merge_max ( rhs:&meshlib::DistanceMap ) -> &meshlib::DistanceMap

replaces values with cell-wise maximum values. Invalid values remain only if both corresponding cells are invalid Generated from method MR::DistanceMap::mergeMax.

Calls MR_DistanceMap_mergeMax().

◆ merge_min()

auto meshlib::DistanceMap::merge_min ( rhs:&meshlib::DistanceMap ) -> &meshlib::DistanceMap

replaces values with cell-wise minimum values. Invalid values remain only if both corresponding cells are invalid Generated from method MR::DistanceMap::mergeMin.

Calls MR_DistanceMap_mergeMin().

◆ min()

auto meshlib::DistanceMap::min ( rhs:&meshlib::DistanceMap ) const -> meshlib::Owned< meshlib::DistanceMap >

returns new Distance Map with cell-wise minimum values. Invalid values remain only if both corresponding cells are invalid Generated from method MR::DistanceMap::min.

Calls MR_DistanceMap_min().

◆ negate()

void meshlib::DistanceMap::negate ( )

replaces every valid element in the map with its negative value Generated from method MR::DistanceMap::negate.

Calls MR_DistanceMap_negate().

◆ new()

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

Constructs an empty (default-constructed) instance.

Calls MR_DistanceMap_DefaultConstruct().

◆ not_valid_value()

auto meshlib::DistanceMap::not_valid_value ( ) -> *const f32
static

a constant that is treated as 'no value' or 'invalid value' Returns a pointer to a member variable of class MR::DistanceMap named NOT_VALID_VALUE.

Calls MR_DistanceMap_Get_NOT_VALID_VALUE().

◆ num_points()

auto meshlib::DistanceMap::num_points ( ) const -> usize

returns the number of pixels Generated from method MR::DistanceMap::numPoints.

Calls MR_DistanceMap_numPoints().

◆ op_sub()

auto meshlib::DistanceMap::op_sub ( rhs:&meshlib::DistanceMap ) const -> meshlib::Owned< meshlib::DistanceMap >

returns new Distance Map with cell-wise subtracted values. Invalid values remain only if both corresponding cells are invalid Generated from method MR::DistanceMap::operator-.

Calls MR_sub_MR_DistanceMap().

◆ res_x()

auto meshlib::DistanceMap::res_x ( ) const -> usize

returns X resolution Generated from method MR::DistanceMap::resX.

Calls MR_DistanceMap_resX().

◆ res_y()

auto meshlib::DistanceMap::res_y ( ) const -> usize

returns Y resolution Generated from method MR::DistanceMap::resY.

Calls MR_DistanceMap_resY().

◆ resize()

void meshlib::DistanceMap::resize ( dims:&meshlib::Vector2i )

Generated from method MR::DistanceMap::resize.

Calls MR_DistanceMap_resize().

◆ set_1()

void meshlib::DistanceMap::set_1 ( data:&meshlib::std_vector_float )

sets all values at one time Generated from method MR::DistanceMap::set.

Calls MR_DistanceMap_set_1().

◆ set_2()

void meshlib::DistanceMap::set_2 ( i:usize ,
val:f32  )

sets value in index element (the coord must be valid, UB otherwise) Generated from method MR::DistanceMap::set.

Calls MR_DistanceMap_set_2().

◆ set_3()

void meshlib::DistanceMap::set_3 ( x:usize ,
y:usize ,
val:f32  )

sets value in (X,Y) element (the coords must be valid, UB otherwise) Generated from method MR::DistanceMap::set.

Calls MR_DistanceMap_set_3().

◆ size()

auto meshlib::DistanceMap::size ( ) const -> usize

Generated from method MR::DistanceMap::size.

Calls MR_DistanceMap_size().

◆ static_downcast_from_rect_indexer()

auto meshlib::DistanceMap::static_downcast_from_rect_indexer ( object:&meshlib::RectIndexer ) -> &Self
static

Static downcast from the base class MR::RectIndexer.

Calls MR_DistanceMap_StaticDowncastFrom_MR_RectIndexer(). Undefined behavior if the object isn't actually a DistanceMap.

Note
This function is unsafe.

◆ static_downcast_from_rect_indexer_mut()

auto meshlib::DistanceMap::static_downcast_from_rect_indexer_mut ( object:&mut meshlib::RectIndexer ) -> &mut Self
static

Static downcast from the base class MR::RectIndexer.

Calls MR_DistanceMap_MutableStaticDowncastFrom_MR_RectIndexer(). Undefined behavior if the object isn't actually a DistanceMap.

Note
This function is unsafe.

◆ sub_assign()

auto meshlib::DistanceMap::sub_assign ( rhs:&meshlib::DistanceMap ) -> &meshlib::DistanceMap

replaces values with cell-wise subtracted values. Invalid values remain only if both corresponding cells are invalid Generated from method MR::DistanceMap::operator-=.

Calls MR_DistanceMap_sub_assign().

◆ to_index()

auto meshlib::DistanceMap::to_index ( pos:&meshlib::Vector2i ) const -> usize

Generated from method MR::DistanceMap::toIndex.

Calls MR_DistanceMap_toIndex().

◆ to_pixel_id()

auto meshlib::DistanceMap::to_pixel_id ( pos:&meshlib::Vector2i ) const -> meshlib::PixelId

Generated from method MR::DistanceMap::toPixelId.

Calls MR_DistanceMap_toPixelId().

◆ unproject()

auto meshlib::DistanceMap::unproject ( x:usize ,
y:usize ,
toWorld:&meshlib::AffineXf3f  ) const -> meshlib::Owned< meshlib::std_optional_MR_Vector3f >

finds 3d coordinates of the Point on the model surface for the (x,y) pixel Use the same params with distance map creation (x,y) must be in bounds, the behavior is undefined otherwise. Generated from method MR::DistanceMap::unproject.

Calls MR_DistanceMap_unproject().

◆ unproject_interpolated()

auto meshlib::DistanceMap::unproject_interpolated ( x:f32 ,
y:f32 ,
toWorld:&meshlib::AffineXf3f  ) const -> meshlib::Owned< meshlib::std_optional_MR_Vector3f >

finds 3d coordinates of the Point on the model surface for the (x,y) interpolated value

Parameters
x,yshould be in resolution range [0;resX][0;resY].

getInterpolated( 0.5f, 0.5f ) == get( 0, 0 ) see https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-coordinates for details all 4 elements around this point should be valid, returns nullopt if at least one is not valid If x,y are out of bounds, returns nullopt.

Generated from method MR::DistanceMap::unprojectInterpolated.

Calls MR_DistanceMap_unprojectInterpolated().

◆ unset_1()

void meshlib::DistanceMap::unset_1 ( i:usize )

invalidates value in index element (the coord must be valid, UB otherwise) Generated from method MR::DistanceMap::unset.

Calls MR_DistanceMap_unset_1().

◆ unset_2()

void meshlib::DistanceMap::unset_2 ( x:usize ,
y:usize  )

invalidates value in (X,Y) element (the coords must be valid, UB otherwise) Generated from method MR::DistanceMap::unset.

Calls MR_DistanceMap_unset_2().

◆ upcast_to_rect_indexer()

auto meshlib::DistanceMap::upcast_to_rect_indexer ( ) const -> &meshlib::RectIndexer

Upcasts to the base class MR::RectIndexer.

Calls MR_DistanceMap_UpcastTo_MR_RectIndexer().

◆ upcast_to_rect_indexer_mut()

auto meshlib::DistanceMap::upcast_to_rect_indexer_mut ( ) -> &mut meshlib::RectIndexer

Upcasts to the base class MR::RectIndexer.

Calls MR_DistanceMap_MutableUpcastTo_MR_RectIndexer().


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