MeshLib Python Docs
Loading...
Searching...
No Matches
meshlib.mrmeshpy.FastWindingNumber Class Reference
+ Inheritance diagram for meshlib.mrmeshpy.FastWindingNumber:

Public Member Functions

None __init__ (self, Mesh mesh)
 
None __init__ (self, FastWindingNumber arg0)
 
None calcFromGrid (self, std_vector_float res, Vector3i dims, AffineXf3f gridToMeshXf, float beta, func_bool_from_float cb)
 
None calcFromGridWithDistances (self, std_vector_float res, Vector3i dims, AffineXf3f gridToMeshXf, float windingNumberThreshold, float beta, float maxDistSq, float minDistSq, func_bool_from_float cb)
 
None calcFromVector (self, std_vector_float res, std_vector_Vector3_float points, float beta, FaceId skipFace='MR::FaceId{}')
 
bool calcSelfIntersections (self, FaceBitSet res, float beta, func_bool_from_float cb)
 
float calcWithDistances (self, Vector3f p, float windingNumberThreshold, float beta, float maxDistSq, float minDistSq)
 

Detailed Description

Generated from:  MR::FastWindingNumber

the class for fast approximate computation of winding number for a mesh (using its AABB tree)
\\ingroup AABBTreeGroup
Note, this used to be `[[nodiscard]]`, but GCC 12 doesn't understand both `[[...]]` and `__attribute__(...)` on the same class.
A possible fix is to change `MRMESH_CLASS` globally to `[[__gnu__::__visibility__("default")]]`.

Constructor & Destructor Documentation

◆ __init__() [1/2]

None meshlib.mrmeshpy.FastWindingNumber.__init__ ( self,
Mesh mesh )
constructs this from AABB tree of given mesh;
this remains valid only if tree is valid

◆ __init__() [2/2]

None meshlib.mrmeshpy.FastWindingNumber.__init__ ( self,
FastWindingNumber arg0 )
Implicit copy constructor.

Member Function Documentation

◆ calcFromGrid()

None meshlib.mrmeshpy.FastWindingNumber.calcFromGrid ( self,
std_vector_float res,
Vector3i dims,
AffineXf3f gridToMeshXf,
float beta,
func_bool_from_float cb )
<summary>
calculates winding numbers in each point from a three-dimensional grid
</summary>
<param name="res">resulting winding numbers, will be resized automatically</param>
<param name="dims">dimensions of the grid</param>
<param name="gridToMeshXf">transform from integer grid locations to voxel's centers in mesh reference frame</param>
<param name="beta">determines the precision of the approximation: the more the better, recommended value 2 or more</param>

Reimplemented from meshlib.mrmeshpy.IFastWindingNumber.

◆ calcFromGridWithDistances()

None meshlib.mrmeshpy.FastWindingNumber.calcFromGridWithDistances ( self,
std_vector_float res,
Vector3i dims,
AffineXf3f gridToMeshXf,
float windingNumberThreshold,
float beta,
float maxDistSq,
float minDistSq,
func_bool_from_float cb )
<summary>
calculates distances with the sign obtained from winding number in each point from a three-dimensional grid
</summary>
<param name="res">resulting signed distances, will be resized automatically</param>
<param name="dims">dimensions of the grid</param>
<param name="gridToMeshXf">transform from integer grid locations to voxel's centers in mesh reference frame</param>
<param name="windingNumberThreshold">positive distance if winding number below or equal this threshold</param>
<param name="beta">determines the precision of the approximation: the more the better, recommended value 2 or more</param>

Reimplemented from meshlib.mrmeshpy.IFastWindingNumber.

◆ calcFromVector()

None meshlib.mrmeshpy.FastWindingNumber.calcFromVector ( self,
std_vector_float res,
std_vector_Vector3_float points,
float beta,
FaceId skipFace = 'MR::FaceId{}' )
see methods' descriptions in IFastWindingNumber

Reimplemented from meshlib.mrmeshpy.IFastWindingNumber.

◆ calcSelfIntersections()

bool meshlib.mrmeshpy.FastWindingNumber.calcSelfIntersections ( self,
FaceBitSet res,
float beta,
func_bool_from_float cb )
<summary>
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
</summary>
<param name="res">resulting bit set</param>
<param name="beta">determines the precision of the approximation: the more the better, recommended value 2 or more</param>
<returns>false if the operation was canceled by the user</returns>

Reimplemented from meshlib.mrmeshpy.IFastWindingNumber.

◆ calcWithDistances()

float meshlib.mrmeshpy.FastWindingNumber.calcWithDistances ( self,
Vector3f p,
float windingNumberThreshold,
float beta,
float maxDistSq,
float minDistSq )

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