MeshLib C# Docs
Loading...
Searching...
No Matches

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 This is the const half of the class. More...

Inheritance diagram for MR.Const_DistanceMap:

Classes

struct  _Underlying

Public Member Functions

virtual void Dispose ()
unsafe Const_DistanceMap ()
 Constructs an empty (default-constructed) instance.
unsafe Const_DistanceMap (MR._ByValue_DistanceMap _other)
 Generated from constructor MR.DistanceMap.DistanceMap.
 Const_DistanceMap (Const_DistanceMap _other)
 Generated from constructor MR.DistanceMap.DistanceMap.
 Const_DistanceMap (DistanceMap _other)
 Generated from constructor MR.DistanceMap.DistanceMap.
unsafe Const_DistanceMap (ulong resX, ulong resY)
 Preferable constructor with resolution arguments Access by the index (i) is equal to (y*resX + x) Generated from constructor MR.DistanceMap.DistanceMap.
unsafe Const_DistanceMap (MR.Const_Matrix_Float m)
 make from 2d array Generated from constructor MR.DistanceMap.DistanceMap.
unsafe bool isValid (ulong x, ulong y)
 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.
unsafe bool isValid (ulong i)
 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.
unsafe bool isInBounds (ulong x, ulong y)
 Returns true if (X,Y) coordinates are in bounds. Generated from method MR.DistanceMap.isInBounds.
unsafe bool isInBounds (ulong i)
 Returns true if a flattened coordinate is in bounds. Generated from method MR.DistanceMap.isInBounds.
unsafe MR.Std.Optional_Float get (ulong x, ulong y)
 returns value in (X,Y) element, returns nullopt if not valid (see isValid()), UB if out of bounds. Generated from method MR.DistanceMap.get.
unsafe MR.Std.Optional_Float get (ulong i)
 returns value of index element, returns nullopt if not valid (see isValid()), UB if out of bounds. Generated from method MR.DistanceMap.get.
unsafe float getValue (ulong x, ulong y)
 Generated from method MR.DistanceMap.getValue.
unsafe float getValue (ulong i)
 Generated from method MR.DistanceMap.getValue.
unsafe? float data ()
 Generated from method MR.DistanceMap.data.
unsafe MR.Std.Optional_Float getInterpolated (float x, float y)
 finds interpolated value.
unsafe MR.Std.Optional_MRVector3f unproject (ulong x, ulong y, in MR.AffineXf3f toWorld)
 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.
unsafe MR.Std.Optional_MRVector3f unprojectInterpolated (float x, float y, in MR.AffineXf3f toWorld)
 finds 3d coordinates of the Point on the model surface for the (x,y) interpolated value
unsafe MR.DistanceMap max (MR.Const_DistanceMap rhs)
 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.
unsafe MR.DistanceMap min (MR.Const_DistanceMap rhs)
 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.
unsafe MR.DistanceMap getDerivativeMap ()
 returns new derivatives map without directions Generated from method MR.DistanceMap.getDerivativeMap.
unsafe MR.Std.Pair_MRDistanceMap_MRDistanceMap getXYDerivativeMaps ()
 returns new derivative maps with X and Y axes direction Generated from method MR.DistanceMap.getXYDerivativeMaps.
unsafe MR.Std.Vector_StdPairMRUint64TMRUint64T getLocalMaximums ()
 computes single derivative map from XY spaces combined. Returns local maximums then Generated from method MR.DistanceMap.getLocalMaximums.
unsafe ulong resX ()
 returns X resolution Generated from method MR.DistanceMap.resX.
unsafe ulong resY ()
 returns Y resolution Generated from method MR.DistanceMap.resY.
unsafe ulong numPoints ()
 returns the number of pixels Generated from method MR.DistanceMap.numPoints.
unsafe MR.Std.Pair_Float_Float getMinMaxValues ()
 finds minimum and maximum values returns min_float and max_float if all values are invalid Generated from method MR.DistanceMap.getMinMaxValues.
unsafe MR.Std.Pair_MRUint64T_MRUint64T getMinIndex ()
 finds minimum value X,Y returns [-1.-1] if all values are invalid Generated from method MR.DistanceMap.getMinIndex.
unsafe MR.Std.Pair_MRUint64T_MRUint64T getMaxIndex ()
 finds maximum value X,Y returns [-1.-1] if all values are invalid Generated from method MR.DistanceMap.getMaxIndex.
unsafe ulong heapBytes ()
 returns the amount of memory this object occupies on heap Generated from method MR.DistanceMap.heapBytes.
unsafe ref readonly MR.Vector2i dims ()
 Generated from method MR.DistanceMap.dims.
unsafe ulong size ()
 Generated from method MR.DistanceMap.size.
unsafe MR.PixelId toPixelId (in MR.Vector2i pos)
 Generated from method MR.DistanceMap.toPixelId.
unsafe ulong toIndex (in MR.Vector2i pos)
 Generated from method MR.DistanceMap.toIndex.

Static Public Member Functions

static unsafe implicit operator MR.Const_RectIndexer (Const_DistanceMap self)
static unsafe implicit operator Const_DistanceMap (MR.Const_Matrix_Float m)
 make from 2d array Generated from constructor MR.DistanceMap.DistanceMap.
static unsafe MR.DistanceMap operator- (MR.Const_DistanceMap _this, MR.Const_DistanceMap rhs)
 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-.

Protected Member Functions

virtual unsafe void Dispose (bool disposing)

Static Protected Attributes

static unsafe float * __ref_storage_NOTVALIDVALUE

Properties

static unsafe float NOTVALIDVALUE [get]
 a constant that is treated as 'no value' or 'invalid value'

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 This is the const half of the class.

Constructor & Destructor Documentation

◆ Const_DistanceMap() [1/6]

unsafe MR.Const_DistanceMap.Const_DistanceMap ( )
inline

Constructs an empty (default-constructed) instance.

◆ Const_DistanceMap() [2/6]

unsafe MR.Const_DistanceMap.Const_DistanceMap ( MR._ByValue_DistanceMap _other)
inline

Generated from constructor MR.DistanceMap.DistanceMap.

◆ Const_DistanceMap() [3/6]

MR.Const_DistanceMap.Const_DistanceMap ( Const_DistanceMap _other)
inline

Generated from constructor MR.DistanceMap.DistanceMap.

◆ Const_DistanceMap() [4/6]

MR.Const_DistanceMap.Const_DistanceMap ( DistanceMap _other)
inline

Generated from constructor MR.DistanceMap.DistanceMap.

◆ Const_DistanceMap() [5/6]

unsafe MR.Const_DistanceMap.Const_DistanceMap ( ulong resX,
ulong resY )
inline

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

◆ Const_DistanceMap() [6/6]

unsafe MR.Const_DistanceMap.Const_DistanceMap ( MR.Const_Matrix_Float m)
inline

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

Member Function Documentation

◆ data()

unsafe? float MR.Const_DistanceMap.data ( )
inline

Generated from method MR.DistanceMap.data.

◆ dims()

unsafe ref readonly MR.Vector2i MR.Const_DistanceMap.dims ( )
inline

Generated from method MR.DistanceMap.dims.

◆ Dispose() [1/2]

virtual void MR.Const_DistanceMap.Dispose ( )
inlinevirtual

◆ Dispose() [2/2]

virtual unsafe void MR.Const_DistanceMap.Dispose ( bool disposing)
inlineprotectedvirtual

◆ get() [1/2]

unsafe MR.Std.Optional_Float MR.Const_DistanceMap.get ( ulong i)
inline

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

◆ get() [2/2]

unsafe MR.Std.Optional_Float MR.Const_DistanceMap.get ( ulong x,
ulong y )
inline

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

◆ getDerivativeMap()

unsafe MR.DistanceMap MR.Const_DistanceMap.getDerivativeMap ( )
inline

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

◆ getInterpolated()

unsafe MR.Std.Optional_Float MR.Const_DistanceMap.getInterpolated ( float x,
float y )
inline

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.

◆ getLocalMaximums()

unsafe MR.Std.Vector_StdPairMRUint64TMRUint64T MR.Const_DistanceMap.getLocalMaximums ( )
inline

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

◆ getMaxIndex()

unsafe MR.Std.Pair_MRUint64T_MRUint64T MR.Const_DistanceMap.getMaxIndex ( )
inline

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

◆ getMinIndex()

unsafe MR.Std.Pair_MRUint64T_MRUint64T MR.Const_DistanceMap.getMinIndex ( )
inline

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

◆ getMinMaxValues()

unsafe MR.Std.Pair_Float_Float MR.Const_DistanceMap.getMinMaxValues ( )
inline

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

◆ getValue() [1/2]

unsafe float MR.Const_DistanceMap.getValue ( ulong i)
inline

Generated from method MR.DistanceMap.getValue.

◆ getValue() [2/2]

unsafe float MR.Const_DistanceMap.getValue ( ulong x,
ulong y )
inline

Generated from method MR.DistanceMap.getValue.

◆ getXYDerivativeMaps()

unsafe MR.Std.Pair_MRDistanceMap_MRDistanceMap MR.Const_DistanceMap.getXYDerivativeMaps ( )
inline

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

◆ heapBytes()

unsafe ulong MR.Const_DistanceMap.heapBytes ( )
inline

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

◆ isInBounds() [1/2]

unsafe bool MR.Const_DistanceMap.isInBounds ( ulong i)
inline

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

◆ isInBounds() [2/2]

unsafe bool MR.Const_DistanceMap.isInBounds ( ulong x,
ulong y )
inline

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

◆ isValid() [1/2]

unsafe bool MR.Const_DistanceMap.isValid ( ulong i)
inline

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.

◆ isValid() [2/2]

unsafe bool MR.Const_DistanceMap.isValid ( ulong x,
ulong y )
inline

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.

◆ max()

unsafe MR.DistanceMap MR.Const_DistanceMap.max ( MR.Const_DistanceMap rhs)
inline

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.

◆ min()

unsafe MR.DistanceMap MR.Const_DistanceMap.min ( MR.Const_DistanceMap rhs)
inline

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.

◆ numPoints()

unsafe ulong MR.Const_DistanceMap.numPoints ( )
inline

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

◆ operator Const_DistanceMap()

unsafe implicit MR.Const_DistanceMap.operator Const_DistanceMap ( MR.Const_Matrix_Float m)
inlinestatic

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

◆ operator MR.Const_RectIndexer()

unsafe implicit MR.Const_DistanceMap.operator MR.Const_RectIndexer ( Const_DistanceMap self)
inlinestatic

◆ operator-()

unsafe MR.DistanceMap MR.Const_DistanceMap.operator- ( MR.Const_DistanceMap _this,
MR.Const_DistanceMap rhs )
inlinestatic

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

◆ resX()

unsafe ulong MR.Const_DistanceMap.resX ( )
inline

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

◆ resY()

unsafe ulong MR.Const_DistanceMap.resY ( )
inline

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

◆ size()

unsafe ulong MR.Const_DistanceMap.size ( )
inline

Generated from method MR.DistanceMap.size.

◆ toIndex()

unsafe ulong MR.Const_DistanceMap.toIndex ( in MR.Vector2i pos)
inline

Generated from method MR.DistanceMap.toIndex.

◆ toPixelId()

unsafe MR.PixelId MR.Const_DistanceMap.toPixelId ( in MR.Vector2i pos)
inline

Generated from method MR.DistanceMap.toPixelId.

◆ unproject()

unsafe MR.Std.Optional_MRVector3f MR.Const_DistanceMap.unproject ( ulong x,
ulong y,
in MR.AffineXf3f toWorld )
inline

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.

◆ unprojectInterpolated()

unsafe MR.Std.Optional_MRVector3f MR.Const_DistanceMap.unprojectInterpolated ( float x,
float y,
in MR.AffineXf3f toWorld )
inline

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.

Member Data Documentation

◆ __ref_storage_NOTVALIDVALUE

unsafe float* MR.Const_DistanceMap.__ref_storage_NOTVALIDVALUE
staticprotected

Property Documentation

◆ NOTVALIDVALUE

unsafe float MR.Const_DistanceMap.NOTVALIDVALUE
staticget

a constant that is treated as 'no value' or 'invalid value'


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