Public Member Functions | |
None | __init__ (self) |
None | __init__ (self, int resX, int resY) |
None | __init__ (self, Matrix_float m) |
None | __init__ (self, DistanceMap arg0) |
DistanceMap | __isub__ (self, DistanceMap rhs) |
DistanceMap | __sub__ (self, DistanceMap rhs) |
None | clear (self) |
float | data (self) |
float | data (self) |
float | get (self, int x, int y) |
float | get (self, int i) |
DistanceMap | getDerivativeMap (self) |
float | getInterpolated (self, float x, float y) |
std_vector_std_pair_unsigned_long_long_unsigned_long_long | getLocalMaximums (self) |
tuple[int, int] | getMaxIndex (self) |
tuple[int, int] | getMinIndex (self) |
tuple[float, float] | getMinMaxValues (self) |
float | getValue (self, int x, int y) |
float | getValue (self, int x, int y) |
float | getValue (self, int i) |
float | getValue (self, int i) |
tuple[DistanceMap, DistanceMap] | getXYDerivativeMaps (self) |
int | heapBytes (self) |
None | invalidateAll (self) |
bool | isInBounds (self, int x, int y) |
bool | isInBounds (self, int i) |
bool | isValid (self, int x, int y) |
bool | isValid (self, int i) |
DistanceMap | max (self, DistanceMap rhs) |
DistanceMap | mergeMax (self, DistanceMap rhs) |
DistanceMap | mergeMin (self, DistanceMap rhs) |
DistanceMap | min (self, DistanceMap rhs) |
None | negate (self) |
int | numPoints (self) |
int | resX (self) |
int | resY (self) |
None | set (self, int x, int y, float val) |
None | set (self, int i, float val) |
None | set (self, std_vector_float data) |
Vector3f | unproject (self, int x, int y, AffineXf3f toWorld) |
Vector3f | unprojectInterpolated (self, float x, float y, AffineXf3f toWorld) |
None | unset (self, int x, int y) |
None | unset (self, int i) |
![]() | |
bool | areNeigbors (self, PixelId v0, PixelId v1) |
bool | areNeigbors (self, Vector2i pos0, Vector2i pos1) |
Vector2i | dims (self) |
PixelId | getNeighbor (self, PixelId v, OutEdge2 toNei) |
PixelId | getNeighbor (self, PixelId v, Vector2i pos, OutEdge2 toNei) |
None | resize (self, Vector2i dims) |
int | size (self) |
int | toIndex (self, Vector2i pos) |
PixelId | toPixelId (self, Vector2i pos) |
Vector2i | toPos (self, PixelId id) |
Vector2i | toPos (self, int id) |
Static Protected Member Functions | |
_pybind11_conduit_v1_ (*args, **kwargs) | |
Generated from: MR::DistanceMap this class allows to store distances from the plane in particular pixels validVerts keeps only pixels with mesh-intersecting rays from them
None mrmeshpy.DistanceMap.__init__ | ( | self | ) |
Reimplemented from mrmeshpy.RectIndexer.
None mrmeshpy.DistanceMap.__init__ | ( | self, | |
int | resX, | ||
int | resY ) |
Preferable constructor with resolution arguments Access by the index (i) is equal to (y*resX + x)
Reimplemented from mrmeshpy.RectIndexer.
None mrmeshpy.DistanceMap.__init__ | ( | self, | |
Matrix_float | m ) |
make from 2d array
Reimplemented from mrmeshpy.RectIndexer.
None mrmeshpy.DistanceMap.__init__ | ( | self, | |
DistanceMap | arg0 ) |
Implicit copy constructor.
Reimplemented from mrmeshpy.RectIndexer.
DistanceMap mrmeshpy.DistanceMap.__isub__ | ( | self, | |
DistanceMap | rhs ) |
replaces values with cell-wise subtracted values. Invalid values remain only if both corresponding cells are invalid
DistanceMap mrmeshpy.DistanceMap.__sub__ | ( | self, | |
DistanceMap | rhs ) |
returns new Distance Map with cell-wise subtracted values. Invalid values remain only if both corresponding cells are invalid
|
staticprotected |
Reimplemented from mrmeshpy.RectIndexer.
None mrmeshpy.DistanceMap.clear | ( | self | ) |
clears data, sets resolutions to zero
float mrmeshpy.DistanceMap.data | ( | self | ) |
float mrmeshpy.DistanceMap.data | ( | self | ) |
float mrmeshpy.DistanceMap.get | ( | self, | |
int | i ) |
returns value of index element, returns nullopt if not valid (see `isValid()`), UB if out of bounds.
float mrmeshpy.DistanceMap.get | ( | self, | |
int | x, | ||
int | y ) |
returns value in (X,Y) element, returns nullopt if not valid (see `isValid()`), UB if out of bounds.
DistanceMap mrmeshpy.DistanceMap.getDerivativeMap | ( | self | ) |
returns new derivatives map without directions
float mrmeshpy.DistanceMap.getInterpolated | ( | self, | |
float | x, | ||
float | y ) |
\\brief finds interpolated value. \\details 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 \\param x,y should be in resolution range [0;resX][0;resY]. If x,y are out of bounds, returns nullopt.
std_vector_std_pair_unsigned_long_long_unsigned_long_long mrmeshpy.DistanceMap.getLocalMaximums | ( | self | ) |
computes single derivative map from XY spaces combined. Returns local maximums then
tuple[int, int] mrmeshpy.DistanceMap.getMaxIndex | ( | self | ) |
finds maximum value X,Y returns [-1.-1] if all values are invalid
tuple[int, int] mrmeshpy.DistanceMap.getMinIndex | ( | self | ) |
finds minimum value X,Y returns [-1.-1] if all values are invalid
tuple[float, float] mrmeshpy.DistanceMap.getMinMaxValues | ( | self | ) |
finds minimum and maximum values returns min_float and max_float if all values are invalid
float mrmeshpy.DistanceMap.getValue | ( | self, | |
int | i ) |
float mrmeshpy.DistanceMap.getValue | ( | self, | |
int | i ) |
float mrmeshpy.DistanceMap.getValue | ( | self, | |
int | x, | ||
int | y ) |
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
float mrmeshpy.DistanceMap.getValue | ( | self, | |
int | x, | ||
int | y ) |
tuple[DistanceMap, DistanceMap] mrmeshpy.DistanceMap.getXYDerivativeMaps | ( | self | ) |
returns new derivative maps with X and Y axes direction
int mrmeshpy.DistanceMap.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
None mrmeshpy.DistanceMap.invalidateAll | ( | self | ) |
invalidates all elements
bool mrmeshpy.DistanceMap.isInBounds | ( | self, | |
int | i ) |
Returns true if a flattened coordinate is in bounds.
bool mrmeshpy.DistanceMap.isInBounds | ( | self, | |
int | x, | ||
int | y ) |
Returns true if (X,Y) coordinates are in bounds.
bool mrmeshpy.DistanceMap.isValid | ( | self, | |
int | i ) |
checks if index element is valid (i.e. not `std::numeric_limits<float>::lowest()`; passing an invalid coord to this is UB)
bool mrmeshpy.DistanceMap.isValid | ( | self, | |
int | x, | ||
int | y ) |
checks if X,Y element is valid (i.e. not `std::numeric_limits<float>::lowest()`; passing invalid coords to this is UB)
DistanceMap mrmeshpy.DistanceMap.max | ( | self, | |
DistanceMap | rhs ) |
boolean operators returns new Distance Map with cell-wise maximum values. Invalid values remain only if both corresponding cells are invalid
DistanceMap mrmeshpy.DistanceMap.mergeMax | ( | self, | |
DistanceMap | rhs ) |
replaces values with cell-wise maximum values. Invalid values remain only if both corresponding cells are invalid
DistanceMap mrmeshpy.DistanceMap.mergeMin | ( | self, | |
DistanceMap | rhs ) |
replaces values with cell-wise minimum values. Invalid values remain only if both corresponding cells are invalid
DistanceMap mrmeshpy.DistanceMap.min | ( | self, | |
DistanceMap | rhs ) |
returns new Distance Map with cell-wise minimum values. Invalid values remain only if both corresponding cells are invalid
None mrmeshpy.DistanceMap.negate | ( | self | ) |
replaces every valid element in the map with its negative value
int mrmeshpy.DistanceMap.numPoints | ( | self | ) |
returns the number of pixels
int mrmeshpy.DistanceMap.resX | ( | self | ) |
returns X resolution
int mrmeshpy.DistanceMap.resY | ( | self | ) |
returns Y resolution
None mrmeshpy.DistanceMap.set | ( | self, | |
int | i, | ||
float | val ) |
sets value in index element (the coord must be valid, UB otherwise)
None mrmeshpy.DistanceMap.set | ( | self, | |
int | x, | ||
int | y, | ||
float | val ) |
sets value in (X,Y) element (the coords must be valid, UB otherwise)
None mrmeshpy.DistanceMap.set | ( | self, | |
std_vector_float | data ) |
sets all values at one time
Vector3f mrmeshpy.DistanceMap.unproject | ( | self, | |
int | x, | ||
int | y, | ||
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.
Vector3f mrmeshpy.DistanceMap.unprojectInterpolated | ( | self, | |
float | x, | ||
float | y, | ||
AffineXf3f | toWorld ) |
\\brief finds 3d coordinates of the Point on the model surface for the (x,y) interpolated value \\param x,y should be in resolution range [0;resX][0;resY]. \\details 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.
None mrmeshpy.DistanceMap.unset | ( | self, | |
int | i ) |
invalidates value in index element (the coord must be valid, UB otherwise)
None mrmeshpy.DistanceMap.unset | ( | self, | |
int | x, | ||
int | y ) |
invalidates value in (X,Y) element (the coords must be valid, UB otherwise)