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

Public Member Functions

 DistanceMap (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 DistanceMap ()
 DistanceMap (meshlib.DistanceMap _other)
 DistanceMap (long resX, long resY)
 DistanceMap (meshlib.Matrix_float m)
meshlib.DistanceMap assignFromAnother (meshlib.DistanceMap _other)
boolean isValid (long x, long y)
boolean isValid (long i)
boolean isInBounds (long x, long y)
boolean isInBounds (long i)
meshlib.std_optional_float get (long x, long y)
meshlib.std_optional_float get (long i)
java.lang.foreign.MemorySegment getValue_mut_2 (long x, long y)
float getValue_2 (long x, long y)
java.lang.foreign.MemorySegment getValue_mut_1 (long i)
float getValue_1 (long i)
java.lang.foreign.MemorySegment data_mut ()
java.lang.Float data ()
meshlib.std_optional_float getInterpolated (float x, float y)
 finds interpolated value.
meshlib.std_optional_MR_Vector3f unproject (long x, long y, meshlib.AffineXf3f toWorld)
meshlib.std_optional_MR_Vector3f unprojectInterpolated (float x, float y, meshlib.AffineXf3f toWorld)
 finds 3d coordinates of the Point on the model surface for the (x,y) interpolated value
void negate ()
meshlib.DistanceMap max (meshlib.DistanceMap rhs)
meshlib.DistanceMap mergeMax (meshlib.DistanceMap rhs)
meshlib.DistanceMap min (meshlib.DistanceMap rhs)
meshlib.DistanceMap mergeMin (meshlib.DistanceMap rhs)
meshlib.DistanceMap opSub (meshlib.DistanceMap rhs)
meshlib.DistanceMap sub_assign (meshlib.DistanceMap rhs)
void set (long x, long y, float val)
void set (long i, float val)
void set (meshlib.std_vector_float data)
void unset (long x, long y)
void unset (long i)
void invalidateAll ()
void clear ()
meshlib.DistanceMap getDerivativeMap ()
meshlib.std_pair_MR_DistanceMap_MR_DistanceMap getXYDerivativeMaps ()
meshlib.std_vector_std_pair_size_t_size_t getLocalMaximums ()
long resX ()
long resY ()
long numPoints ()
meshlib.std_pair_float_float getMinMaxValues ()
meshlib.std_pair_size_t_size_t getMinIndex ()
meshlib.std_pair_size_t_size_t getMaxIndex ()
long heapBytes ()
void resize (meshlib.Vector2i dims)
meshlib.Vector2i dims ()
long size ()
meshlib.PixelId toPixelId (meshlib.Vector2i pos)
long toIndex (meshlib.Vector2i pos)
meshlib.RectIndexer upcastToRectIndexer ()
Public Member Functions inherited from meshlib.CppObject
final java.lang.foreign.MemorySegment rawPointer ()
final boolean isOwned ()
final void close ()
final java.lang.foreign.MemorySegment release ()

Static Public Member Functions

static float NOT_VALID_VALUE ()
static meshlib.DistanceMap staticDowncastFromRectIndexer (meshlib.RectIndexer object)

Additional Inherited Members

Protected Member Functions inherited from meshlib.CppObject
 CppObject (java.lang.foreign.MemorySegment ptr, java.util.function.Consumer< java.lang.foreign.MemorySegment > destroy, java.lang.Object owner)

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

Instances created here own their C++ objects, see CppObject.

Constructor & Destructor Documentation

◆ DistanceMap() [1/5]

meshlib.DistanceMap.DistanceMap ( java.lang.foreign.MemorySegment ptr,
boolean owned,
java.lang.Object owner )

Wraps a pointer from the C bindings. If owned, the object is destroyed when the wrapper dies. owner is kept alive as long as this wrapper is. Not for normal use.

◆ DistanceMap() [2/5]

meshlib.DistanceMap.DistanceMap ( )

Constructs an empty (default-constructed) instance.

Calls MR_DistanceMap_DefaultConstruct().

◆ DistanceMap() [3/5]

meshlib.DistanceMap.DistanceMap ( meshlib.DistanceMap _other)

Generated from constructor MR::DistanceMap::DistanceMap. The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

Calls MR_DistanceMap_ConstructFromAnother().

◆ DistanceMap() [4/5]

meshlib.DistanceMap.DistanceMap ( long resX,
long resY )

Preferable constructor with resolution arguments Access by the index (i) is equal to (y*resX + x) Generated from constructor MR::DistanceMap::DistanceMap. 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.

Calls MR_DistanceMap_Construct_2().

◆ DistanceMap() [5/5]

meshlib.DistanceMap.DistanceMap ( meshlib.Matrix_float m)

make from 2d array Generated from constructor MR::DistanceMap::DistanceMap. The reference to the parameter m might be preserved in the constructed object.

Calls MR_DistanceMap_Construct_1().

Member Function Documentation

◆ assignFromAnother()

meshlib.DistanceMap meshlib.DistanceMap.assignFromAnother ( meshlib.DistanceMap _other)

Generated from method MR::DistanceMap::operator=. The reference to things referred to by the parameter _other (if any) might be preserved in this object.

Calls MR_DistanceMap_AssignFromAnother().

◆ clear()

void meshlib.DistanceMap.clear ( )

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

Calls MR_DistanceMap_clear().

◆ data()

java.lang.Float meshlib.DistanceMap.data ( )

Generated from method MR::DistanceMap::data.

Calls MR_DistanceMap_data().

◆ data_mut()

java.lang.foreign.MemorySegment meshlib.DistanceMap.data_mut ( )

Generated from method MR::DistanceMap::data.

Calls MR_DistanceMap_data_mut(). Some types are raw C types, see the C bindings for the details.

◆ dims()

meshlib.Vector2i meshlib.DistanceMap.dims ( )

Generated from method MR::DistanceMap::dims.

Calls MR_DistanceMap_dims().

◆ get() [1/2]

meshlib.std_optional_float meshlib.DistanceMap.get ( long i)

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/2]

meshlib.std_optional_float meshlib.DistanceMap.get ( long x,
long 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.

Calls MR_DistanceMap_get_2().

◆ getDerivativeMap()

meshlib.DistanceMap meshlib.DistanceMap.getDerivativeMap ( )

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

Calls MR_DistanceMap_getDerivativeMap().

◆ getInterpolated()

meshlib.std_optional_float meshlib.DistanceMap.getInterpolated ( float x,
float y )

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

◆ getLocalMaximums()

meshlib.std_vector_std_pair_size_t_size_t meshlib.DistanceMap.getLocalMaximums ( )

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

Calls MR_DistanceMap_getLocalMaximums().

◆ getMaxIndex()

meshlib.std_pair_size_t_size_t meshlib.DistanceMap.getMaxIndex ( )

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

Calls MR_DistanceMap_getMaxIndex().

◆ getMinIndex()

meshlib.std_pair_size_t_size_t meshlib.DistanceMap.getMinIndex ( )

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

Calls MR_DistanceMap_getMinIndex().

◆ getMinMaxValues()

meshlib.std_pair_float_float meshlib.DistanceMap.getMinMaxValues ( )

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

◆ getValue_1()

float meshlib.DistanceMap.getValue_1 ( long i)

Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_1().

◆ getValue_2()

float meshlib.DistanceMap.getValue_2 ( long x,
long y )

Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_2().

◆ getValue_mut_1()

java.lang.foreign.MemorySegment meshlib.DistanceMap.getValue_mut_1 ( long i)

Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_mut_1(). Some types are raw C types, see the C bindings for the details.

◆ getValue_mut_2()

java.lang.foreign.MemorySegment meshlib.DistanceMap.getValue_mut_2 ( long x,
long 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 Generated from method MR::DistanceMap::getValue.

Calls MR_DistanceMap_getValue_mut_2(). Some types are raw C types, see the C bindings for the details.

◆ getXYDerivativeMaps()

meshlib.std_pair_MR_DistanceMap_MR_DistanceMap meshlib.DistanceMap.getXYDerivativeMaps ( )

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

Calls MR_DistanceMap_getXYDerivativeMaps().

◆ heapBytes()

long meshlib.DistanceMap.heapBytes ( )

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

Calls MR_DistanceMap_heapBytes().

◆ invalidateAll()

void meshlib.DistanceMap.invalidateAll ( )

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

Calls MR_DistanceMap_invalidateAll().

◆ isInBounds() [1/2]

boolean meshlib.DistanceMap.isInBounds ( long i)

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

Calls MR_DistanceMap_isInBounds_1().

◆ isInBounds() [2/2]

boolean meshlib.DistanceMap.isInBounds ( long x,
long y )

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

Calls MR_DistanceMap_isInBounds_2().

◆ isValid() [1/2]

boolean meshlib.DistanceMap.isValid ( long 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.

Calls MR_DistanceMap_isValid_1().

◆ isValid() [2/2]

boolean meshlib.DistanceMap.isValid ( long x,
long 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.

Calls MR_DistanceMap_isValid_2().

◆ max()

meshlib.DistanceMap meshlib.DistanceMap.max ( meshlib.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.

Calls MR_DistanceMap_max().

◆ mergeMax()

meshlib.DistanceMap meshlib.DistanceMap.mergeMax ( meshlib.DistanceMap rhs)

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

◆ mergeMin()

meshlib.DistanceMap meshlib.DistanceMap.mergeMin ( meshlib.DistanceMap rhs)

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

meshlib.DistanceMap meshlib.DistanceMap.min ( meshlib.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.

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

◆ NOT_VALID_VALUE()

float meshlib.DistanceMap.NOT_VALID_VALUE ( )
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().

◆ numPoints()

long meshlib.DistanceMap.numPoints ( )

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

Calls MR_DistanceMap_numPoints().

◆ opSub()

meshlib.DistanceMap meshlib.DistanceMap.opSub ( meshlib.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-.

Calls MR_sub_MR_DistanceMap().

◆ resize()

void meshlib.DistanceMap.resize ( meshlib.Vector2i dims)

Generated from method MR::DistanceMap::resize.

Calls MR_DistanceMap_resize().

◆ resX()

long meshlib.DistanceMap.resX ( )

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

Calls MR_DistanceMap_resX().

◆ resY()

long meshlib.DistanceMap.resY ( )

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

Calls MR_DistanceMap_resY().

◆ set() [1/3]

void meshlib.DistanceMap.set ( long i,
float val )

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

Calls MR_DistanceMap_set_2().

◆ set() [2/3]

void meshlib.DistanceMap.set ( long x,
long y,
float val )

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

Calls MR_DistanceMap_set_3().

◆ set() [3/3]

void meshlib.DistanceMap.set ( meshlib.std_vector_float data)

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

Calls MR_DistanceMap_set_1().

◆ size()

long meshlib.DistanceMap.size ( )

Generated from method MR::DistanceMap::size.

Calls MR_DistanceMap_size().

◆ staticDowncastFromRectIndexer()

meshlib.DistanceMap meshlib.DistanceMap.staticDowncastFromRectIndexer ( meshlib.RectIndexer object)
static

Static downcast from the base class MR::RectIndexer. Undefined behavior if the object isn't actually a DistanceMap. The result refers to object.

Calls MR_DistanceMap_MutableStaticDowncastFrom_MR_RectIndexer().

◆ sub_assign()

meshlib.DistanceMap meshlib.DistanceMap.sub_assign ( meshlib.DistanceMap rhs)

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

◆ toIndex()

long meshlib.DistanceMap.toIndex ( meshlib.Vector2i pos)

Generated from method MR::DistanceMap::toIndex.

Calls MR_DistanceMap_toIndex().

◆ toPixelId()

meshlib.PixelId meshlib.DistanceMap.toPixelId ( meshlib.Vector2i pos)

Generated from method MR::DistanceMap::toPixelId.

Calls MR_DistanceMap_toPixelId().

◆ unproject()

meshlib.std_optional_MR_Vector3f meshlib.DistanceMap.unproject ( long x,
long y,
meshlib.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.

Calls MR_DistanceMap_unproject().

◆ unprojectInterpolated()

meshlib.std_optional_MR_Vector3f meshlib.DistanceMap.unprojectInterpolated ( float x,
float y,
meshlib.AffineXf3f toWorld )

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/2]

void meshlib.DistanceMap.unset ( long i)

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/2]

void meshlib.DistanceMap.unset ( long x,
long y )

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

Calls MR_DistanceMap_unset_2().

◆ upcastToRectIndexer()

meshlib.RectIndexer meshlib.DistanceMap.upcastToRectIndexer ( )

Upcasts to the base class MR::RectIndexer. The result refers to this object.

Calls MR_DistanceMap_MutableUpcastTo_MR_RectIndexer().


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