MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.IFastWindingNumber Class Reference
Inheritance diagram for meshlib.IFastWindingNumber:

Public Member Functions

 IFastWindingNumber (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
void calcFromVector (meshlib.std_vector_float res, meshlib.std_vector_MR_Vector3f points, float beta, meshlib.FaceId skipFace, meshlib.std_function_bool_from_float cb)
void calcSelfIntersections (meshlib.FaceBitSet res, float beta, meshlib.std_function_bool_from_float cb)
void calcFromGrid (meshlib.std_vector_float res, meshlib.Vector3i dims, meshlib.AffineXf3f gridToMeshXf, float beta, meshlib.std_function_bool_from_float cb)
void calcFromGridWithDistances (meshlib.VoxelScalars res, meshlib.Vector3i dims, meshlib.AffineXf3f gridToMeshXf, meshlib.DistanceToMeshOptions options, meshlib.std_function_bool_from_float cb)
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 ()

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

Abstract class for fast approximate computation of generalized winding number for a mesh (using its AABB tree) Generated from class MR::IFastWindingNumber. Derived classes: Direct: (non-virtual) MR::Cuda::FastWindingNumber MR::FastWindingNumber

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

Constructor & Destructor Documentation

◆ IFastWindingNumber()

meshlib.IFastWindingNumber.IFastWindingNumber ( 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.

Member Function Documentation

◆ calcFromGrid()

void meshlib.IFastWindingNumber.calcFromGrid ( meshlib.std_vector_float res,
meshlib.Vector3i dims,
meshlib.AffineXf3f gridToMeshXf,
float beta,
meshlib.std_function_bool_from_float cb )

calculates winding numbers in each point from a three-dimensional grid

Parameters
resresulting winding numbers, will be resized automatically
dimsdimensions of the grid
gridToMeshXftransform from integer grid locations to voxel's centers in mesh reference frame
betadetermines the precision of the approximation: the more the better, recommended value 2 or more Generated from method MR::IFastWindingNumber::calcFromGrid.

Calls MR_IFastWindingNumber_calcFromGrid(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ calcFromGridWithDistances()

void meshlib.IFastWindingNumber.calcFromGridWithDistances ( meshlib.VoxelScalars res,
meshlib.Vector3i dims,
meshlib.AffineXf3f gridToMeshXf,
meshlib.DistanceToMeshOptions options,
meshlib.std_function_bool_from_float cb )

calculates distances with the sign obtained from generalized winding number in each point from a three-dimensional grid; if sqr(res) < minDistSq or sqr(res) >= maxDistSq, then NaN is returned for such point

Parameters
resresulting signed distances, will be resized automatically
dimsdimensions of the grid Generated from method MR::IFastWindingNumber::calcFromGridWithDistances.

Calls MR_IFastWindingNumber_calcFromGridWithDistances(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ calcFromVector()

void meshlib.IFastWindingNumber.calcFromVector ( meshlib.std_vector_float res,
meshlib.std_vector_MR_Vector3f points,
float beta,
meshlib.FaceId skipFace,
meshlib.std_function_bool_from_float cb )

calculates winding numbers in the points from given vector

Parameters
resresulting winding numbers, will be resized automatically
pointsincoming points
betadetermines the precision of the approximation: the more the better, recommended value 2 or more
skipFacethis triangle (if it is close to q) will be skipped from summation Generated from method MR::IFastWindingNumber::calcFromVector.

Calls MR_IFastWindingNumber_calcFromVector(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ calcSelfIntersections()

void meshlib.IFastWindingNumber.calcSelfIntersections ( meshlib.FaceBitSet res,
float beta,
meshlib.std_function_bool_from_float cb )

calculates winding numbers for all centers of mesh's triangles. if winding number is less than 0 or greater then 1, that face is marked as self-intersected

Parameters
resresulting bit set
betadetermines the precision of the approximation: the more the better, recommended value 2 or more Generated from method MR::IFastWindingNumber::calcSelfIntersections.

Calls MR_IFastWindingNumber_calcSelfIntersections(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.


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