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 |
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>.
| 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.
| void meshlib::DistanceMap::clear | ( | ) |
clears data, sets resolutions to zero Generated from method MR::DistanceMap::clear.
Calls MR_DistanceMap_clear().
|
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.
|
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.
|
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.
| auto meshlib::DistanceMap::data | ( | ) | const -> Option<&f32 > |
Generated from method MR::DistanceMap::data.
Calls MR_DistanceMap_data().
| auto meshlib::DistanceMap::data_mut | ( | ) | -> Option<&mut f32 > |
Generated from method MR::DistanceMap::data.
Calls MR_DistanceMap_data_mut().
| auto meshlib::DistanceMap::dims | ( | ) | const -> &meshlib::Vector2i |
Generated from method MR::DistanceMap::dims.
Calls MR_DistanceMap_dims().
| 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().
| 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().
| 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().
| 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
| x,y | should 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().
| 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().
| 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().
| 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().
| 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().
| auto meshlib::DistanceMap::get_value_1 | ( | i:usize | ) | const -> f32 |
Generated from method MR::DistanceMap::getValue.
Calls MR_DistanceMap_getValue_1().
| auto meshlib::DistanceMap::get_value_2 | ( | x:usize | , |
| y:usize | ) const -> f32 |
Generated from method MR::DistanceMap::getValue.
Calls MR_DistanceMap_getValue_2().
| auto meshlib::DistanceMap::get_value_mut_1 | ( | i:usize | ) | -> &mut f32 |
Generated from method MR::DistanceMap::getValue.
Calls MR_DistanceMap_getValue_mut_1().
| 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().
| 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().
| 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().
| void meshlib::DistanceMap::invalidate_all | ( | ) |
invalidates all elements Generated from method MR::DistanceMap::invalidateAll.
Calls MR_DistanceMap_invalidateAll().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
| 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().
|
static |
Constructs an empty (default-constructed) instance.
Calls MR_DistanceMap_DefaultConstruct().
|
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().
| auto meshlib::DistanceMap::num_points | ( | ) | const -> usize |
returns the number of pixels Generated from method MR::DistanceMap::numPoints.
Calls MR_DistanceMap_numPoints().
| 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().
| auto meshlib::DistanceMap::res_x | ( | ) | const -> usize |
returns X resolution Generated from method MR::DistanceMap::resX.
Calls MR_DistanceMap_resX().
| auto meshlib::DistanceMap::res_y | ( | ) | const -> usize |
returns Y resolution Generated from method MR::DistanceMap::resY.
Calls MR_DistanceMap_resY().
| void meshlib::DistanceMap::resize | ( | dims:&meshlib::Vector2i | ) |
Generated from method MR::DistanceMap::resize.
Calls MR_DistanceMap_resize().
| 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().
| 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().
| 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().
| auto meshlib::DistanceMap::size | ( | ) | const -> usize |
Generated from method MR::DistanceMap::size.
Calls MR_DistanceMap_size().
|
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.
|
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.
| 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().
| auto meshlib::DistanceMap::to_index | ( | pos:&meshlib::Vector2i | ) | const -> usize |
Generated from method MR::DistanceMap::toIndex.
Calls MR_DistanceMap_toIndex().
| auto meshlib::DistanceMap::to_pixel_id | ( | pos:&meshlib::Vector2i | ) | const -> meshlib::PixelId |
Generated from method MR::DistanceMap::toPixelId.
Calls MR_DistanceMap_toPixelId().
| 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().
| 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
| x,y | should 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().
| 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().
| 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().
| auto meshlib::DistanceMap::upcast_to_rect_indexer | ( | ) | const -> &meshlib::RectIndexer |
Upcasts to the base class MR::RectIndexer.
Calls MR_DistanceMap_UpcastTo_MR_RectIndexer().
| auto meshlib::DistanceMap::upcast_to_rect_indexer_mut | ( | ) | -> &mut meshlib::RectIndexer |
Upcasts to the base class MR::RectIndexer.
Calls MR_DistanceMap_MutableUpcastTo_MR_RectIndexer().