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

Public Member Functions

 DecimateSettings (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 DecimateSettings ()
 DecimateSettings (meshlib.DecimateStrategy strategy, float maxError, float maxEdgeLen, float maxBdShift, float maxTriangleAspectRatio, float criticalTriAspectRatio, boolean preventNormalFlips, float tinyEdgeLength, float stabilizer, boolean angleWeightedDistToPlane, boolean optimizeVertexPos, int maxDeletedVertices, int maxDeletedFaces, meshlib.FaceBitSet region, meshlib.UndirectedEdgeBitSet notFlippable, boolean collapseNearNotFlippable, meshlib.UndirectedEdgeBitSet edgesToCollapse, meshlib.phmap.phmap_flat_hash_map_MR_UndirectedEdgeId_MR_UndirectedEdgeId_phmap_Hash_MR_UndirectedEdgeId_phmap_Equ__246e441a twinMap, boolean touchNearBdEdges, boolean touchBdVerts, meshlib.VertBitSet bdVerts, meshlib.UndirectedEdgeBitSet regionEdges, float maxAngleChange, meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref preCollapse, meshlib.std_function_void_from_MR_UndirectedEdgeId_float_ref_MR_Vector3f_ref adjustCollapse, meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeDel, meshlib.Vector_MR_QuadraticForm3f_MR_VertId vertForms, boolean packMesh, meshlib.std_function_bool_from_float progressCallback, int subdivideParts, meshlib.DecimatePartsMode partsMode, boolean decimateBetweenParts, meshlib.std_vector_MR_FaceBitSet partFaces, int minFacesInPart)
 DecimateSettings (meshlib.DecimateSettings _other)
meshlib.DecimateSettings assignFromAnother (meshlib.DecimateSettings _other)
meshlib.DecimateStrategy strategy ()
void setStrategy (meshlib.DecimateStrategy value)
float maxError ()
void setMaxError (float value)
float maxEdgeLen ()
void setMaxEdgeLen (float value)
float maxBdShift ()
void setMaxBdShift (float value)
float maxTriangleAspectRatio ()
void setMaxTriangleAspectRatio (float value)
float criticalTriAspectRatio ()
void setCriticalTriAspectRatio (float value)
boolean preventNormalFlips ()
void setPreventNormalFlips (boolean value)
float tinyEdgeLength ()
void setTinyEdgeLength (float value)
float stabilizer ()
void setStabilizer (float value)
boolean angleWeightedDistToPlane ()
void setAngleWeightedDistToPlane (boolean value)
boolean optimizeVertexPos ()
void setOptimizeVertexPos (boolean value)
int maxDeletedVertices ()
void setMaxDeletedVertices (int value)
int maxDeletedFaces ()
void setMaxDeletedFaces (int value)
java.lang.foreign.MemorySegment region ()
void setRegion (meshlib.FaceBitSet value)
java.lang.foreign.MemorySegment notFlippable ()
void setNotFlippable (meshlib.UndirectedEdgeBitSet value)
boolean collapseNearNotFlippable ()
void setCollapseNearNotFlippable (boolean value)
java.lang.foreign.MemorySegment edgesToCollapse ()
void setEdgesToCollapse (meshlib.UndirectedEdgeBitSet value)
java.lang.foreign.MemorySegment twinMap ()
void setTwinMap (meshlib.phmap.phmap_flat_hash_map_MR_UndirectedEdgeId_MR_UndirectedEdgeId_phmap_Hash_MR_UndirectedEdgeId_phmap_Equ__246e441a value)
boolean touchNearBdEdges ()
void setTouchNearBdEdges (boolean value)
boolean touchBdVerts ()
void setTouchBdVerts (boolean value)
java.lang.foreign.MemorySegment bdVerts ()
void setBdVerts (meshlib.VertBitSet value)
java.lang.foreign.MemorySegment regionEdges ()
void setRegionEdges (meshlib.UndirectedEdgeBitSet value)
float maxAngleChange ()
void setMaxAngleChange (float value)
meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref preCollapse ()
 The user can provide this optional callback that is invoked immediately before edge collapse;.
void setPreCollapse (meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref value)
 The user can provide this optional callback that is invoked immediately before edge collapse;.
meshlib.std_function_void_from_MR_UndirectedEdgeId_float_ref_MR_Vector3f_ref adjustCollapse ()
 The user can provide this optional callback for adjusting error introduced by this edge collapse and the collapse position.
void setAdjustCollapse (meshlib.std_function_void_from_MR_UndirectedEdgeId_float_ref_MR_Vector3f_ref value)
 The user can provide this optional callback for adjusting error introduced by this edge collapse and the collapse position.
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeDel ()
void setOnEdgeDel (meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId value)
java.lang.foreign.MemorySegment vertForms ()
 If not null, then vertex quadratic forms are stored there; if on input the vector is not empty then initialization is skipped in favor of values from there; on output: quadratic form for each remaining vertex is returned there.
void setVertForms (meshlib.Vector_MR_QuadraticForm3f_MR_VertId value)
 If not null, then vertex quadratic forms are stored there; if on input the vector is not empty then initialization is skipped in favor of values from there; on output: quadratic form for each remaining vertex is returned there.
boolean packMesh ()
void setPackMesh (boolean value)
meshlib.std_function_bool_from_float progressCallback ()
void setProgressCallback (meshlib.std_function_bool_from_float value)
int subdivideParts ()
void setSubdivideParts (int value)
meshlib.DecimatePartsMode partsMode ()
void setPartsMode (meshlib.DecimatePartsMode value)
boolean decimateBetweenParts ()
void setDecimateBetweenParts (boolean value)
java.lang.foreign.MemorySegment partFaces ()
void setPartFaces (meshlib.std_vector_MR_FaceBitSet value)
int minFacesInPart ()
void setMinFacesInPart (int value)
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)

Constructor & Destructor Documentation

◆ DecimateSettings() [1/4]

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

◆ DecimateSettings() [2/4]

meshlib.DecimateSettings.DecimateSettings ( )

Constructs an empty (default-constructed) instance.

Calls MR_DecimateSettings_DefaultConstruct().

◆ DecimateSettings() [3/4]

meshlib.DecimateSettings.DecimateSettings ( meshlib.DecimateStrategy strategy,
float maxError,
float maxEdgeLen,
float maxBdShift,
float maxTriangleAspectRatio,
float criticalTriAspectRatio,
boolean preventNormalFlips,
float tinyEdgeLength,
float stabilizer,
boolean angleWeightedDistToPlane,
boolean optimizeVertexPos,
int maxDeletedVertices,
int maxDeletedFaces,
meshlib.FaceBitSet region,
meshlib.UndirectedEdgeBitSet notFlippable,
boolean collapseNearNotFlippable,
meshlib.UndirectedEdgeBitSet edgesToCollapse,
meshlib.phmap.phmap_flat_hash_map_MR_UndirectedEdgeId_MR_UndirectedEdgeId_phmap_Hash_MR_UndirectedEdgeId_phmap_Equ__246e441a twinMap,
boolean touchNearBdEdges,
boolean touchBdVerts,
meshlib.VertBitSet bdVerts,
meshlib.UndirectedEdgeBitSet regionEdges,
float maxAngleChange,
meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref preCollapse,
meshlib.std_function_void_from_MR_UndirectedEdgeId_float_ref_MR_Vector3f_ref adjustCollapse,
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeDel,
meshlib.Vector_MR_QuadraticForm3f_MR_VertId vertForms,
boolean packMesh,
meshlib.std_function_bool_from_float progressCallback,
int subdivideParts,
meshlib.DecimatePartsMode partsMode,
boolean decimateBetweenParts,
meshlib.std_vector_MR_FaceBitSet partFaces,
int minFacesInPart )

Constructs MR::DecimateSettings elementwise. The reference to the parameter strategy might be preserved in the constructed object. The reference to the parameter region might be preserved in the constructed object. The reference to the parameter notFlippable might be preserved in the constructed object. The reference to the parameter edgesToCollapse might be preserved in the constructed object. The reference to the parameter twinMap might be preserved in the constructed object. The reference to the parameter bdVerts might be preserved in the constructed object. The reference to the parameter regionEdges might be preserved in the constructed object. The reference to the parameter preCollapse might be preserved in the constructed object. The reference to the parameter adjustCollapse might be preserved in the constructed object. The reference to the parameter onEdgeDel might be preserved in the constructed object. The reference to the parameter vertForms might be preserved in the constructed object. The reference to the parameter progressCallback might be preserved in the constructed object. The reference to the parameter partsMode might be preserved in the constructed object. The reference to the parameter partFaces might be preserved in the constructed object.

Calls MR_DecimateSettings_ConstructFrom().

◆ DecimateSettings() [4/4]

meshlib.DecimateSettings.DecimateSettings ( meshlib.DecimateSettings _other)

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

Calls MR_DecimateSettings_ConstructFromAnother().

Member Function Documentation

◆ adjustCollapse()

The user can provide this optional callback for adjusting error introduced by this edge collapse and the collapse position.

On input the callback gets the squared error and position computed by standard means, and callback can modify any of them. The larger the error, the later this edge will be collapsed. This callback can be called from many threads in parallel and must be thread-safe. This callback can be called many times for each edge before real collapsing, and it is important to make the same adjustment.

Returns a pointer to a member variable of class MR::DecimateSettings named adjustCollapse. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_adjustCollapse().

◆ angleWeightedDistToPlane()

boolean meshlib.DecimateSettings.angleWeightedDistToPlane ( )

if false, then quadratic error metric is equal to the sum of distances to the planes of original mesh triangles; if true, then the sum is weighted, and the weight is equal to the angle of adjacent triangle at the vertex divided on PI (to get one after summing all 3 vertices of the triangle) Returns a pointer to a member variable of class MR::DecimateSettings named angleWeightedDistToPlane. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_angleWeightedDistToPlane().

◆ assignFromAnother()

meshlib.DecimateSettings meshlib.DecimateSettings.assignFromAnother ( meshlib.DecimateSettings _other)

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

Calls MR_DecimateSettings_AssignFromAnother().

◆ bdVerts()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.bdVerts ( )

if touchNearBdEdges=false or touchBdVerts=false then the algorithm needs to know about all boundary vertices; if the pointer is not null then boundary vertices detection is replaced with testing values in this bit-set; the algorithm updates this set if it packs the mesh Returns a pointer to a member variable of class MR::DecimateSettings named bdVerts. The reference to this object might be preserved as the return value.

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

◆ collapseNearNotFlippable()

boolean meshlib.DecimateSettings.collapseNearNotFlippable ( )

Whether to allow collapse of edges incident to notFlippable edges, which can move vertices of notFlippable edges unless they are fixed Returns a pointer to a member variable of class MR::DecimateSettings named collapseNearNotFlippable. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_collapseNearNotFlippable().

◆ criticalTriAspectRatio()

float meshlib.DecimateSettings.criticalTriAspectRatio ( )

the algorithm will ignore dihedral angle check if one of triangles had aspect ratio equal or more than this value; and the algorithm will permit temporary increase in aspect ratio after collapse, if before collapse one of the triangles had larger aspect ratio Returns a pointer to a member variable of class MR::DecimateSettings named criticalTriAspectRatio. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_criticalTriAspectRatio().

◆ decimateBetweenParts()

boolean meshlib.DecimateSettings.decimateBetweenParts ( )

Whether to decimate near the borders of individual parts to eliminate small edges there: as soon as two sibling nodes in the binary tree of parts are decimated, their union is decimated in parallel with other nodes, and only the border between two halves of the mesh remains for the final decimation of whole mesh region Returns a pointer to a member variable of class MR::DecimateSettings named decimateBetweenParts. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_decimateBetweenParts().

◆ edgesToCollapse()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.edgesToCollapse ( )

If pointer is not null, then only edges from here can be collapsed (and some nearby edges can disappear); the algorithm updates this map during collapses, removing or replacing elements Returns a pointer to a member variable of class MR::DecimateSettings named edgesToCollapse. The reference to this object might be preserved as the return value.

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

◆ maxAngleChange()

float meshlib.DecimateSettings.maxAngleChange ( )

Permit edge flips (in addition to collapsing) to improve Delone quality of the mesh if it does not change dihedral angle more than on this value (negative value prohibits any edge flips) Returns a pointer to a member variable of class MR::DecimateSettings named maxAngleChange. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxAngleChange().

◆ maxBdShift()

float meshlib.DecimateSettings.maxBdShift ( )

Maximal shift of a boundary during one edge collapse Returns a pointer to a member variable of class MR::DecimateSettings named maxBdShift. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxBdShift().

◆ maxDeletedFaces()

int meshlib.DecimateSettings.maxDeletedFaces ( )

Limit on the number of deleted faces Returns a pointer to a member variable of class MR::DecimateSettings named maxDeletedFaces. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxDeletedFaces().

◆ maxDeletedVertices()

int meshlib.DecimateSettings.maxDeletedVertices ( )

Limit on the number of deleted vertices Returns a pointer to a member variable of class MR::DecimateSettings named maxDeletedVertices. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxDeletedVertices().

◆ maxEdgeLen()

float meshlib.DecimateSettings.maxEdgeLen ( )

Maximal possible edge length created during decimation Returns a pointer to a member variable of class MR::DecimateSettings named maxEdgeLen. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxEdgeLen().

◆ maxError()

float meshlib.DecimateSettings.maxError ( )

for DecimateStrategy.MinimizeError: stop the decimation as soon as the estimated distance deviation from the original mesh is more than this value for DecimateStrategy.ShortestEdgeFirst only: stop the decimation as soon as the shortest edge in the mesh is greater than this value Returns a pointer to a member variable of class MR::DecimateSettings named maxError. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxError().

◆ maxTriangleAspectRatio()

float meshlib.DecimateSettings.maxTriangleAspectRatio ( )

Maximal possible aspect ratio of a triangle introduced during decimation Returns a pointer to a member variable of class MR::DecimateSettings named maxTriangleAspectRatio. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_maxTriangleAspectRatio().

◆ minFacesInPart()

int meshlib.DecimateSettings.minFacesInPart ( )

minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode Returns a pointer to a member variable of class MR::DecimateSettings named minFacesInPart. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_minFacesInPart().

◆ notFlippable()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.notFlippable ( )

Edges specified by this bit-set will never be flipped, but they can be collapsed or replaced during collapse of nearby edges so it is updated during the operation Returns a pointer to a member variable of class MR::DecimateSettings named notFlippable. The reference to this object might be preserved as the return value.

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

◆ onEdgeDel()

meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId meshlib.DecimateSettings.onEdgeDel ( )

this function is called each time edge (del) is deleted; if valid (rem) is given then dest(del) = dest(rem) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del) Returns a pointer to a member variable of class MR::DecimateSettings named onEdgeDel. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_onEdgeDel().

◆ optimizeVertexPos()

boolean meshlib.DecimateSettings.optimizeVertexPos ( )

if true then after each edge collapse the position of remaining vertex is optimized to minimize local shape change, if false then the edge is collapsed in one of its vertices, which keeps its position Returns a pointer to a member variable of class MR::DecimateSettings named optimizeVertexPos. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_optimizeVertexPos().

◆ packMesh()

boolean meshlib.DecimateSettings.packMesh ( )

whether to pack mesh at the end Returns a pointer to a member variable of class MR::DecimateSettings named packMesh. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_packMesh().

◆ partFaces()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.partFaces ( )

if not null, then it contains the faces of each subdivision part on input, which must not overlap, and after decimation of all parts, the region inside each part is put here; decimateBetweenParts=true or packMesh=true are not compatible with this option Returns a pointer to a member variable of class MR::DecimateSettings named partFaces. The reference to this object might be preserved as the return value.

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

◆ partsMode()

meshlib.DecimatePartsMode meshlib.DecimateSettings.partsMode ( )

how the parts are found for subdivideParts > 1; ignored if partFaces is given Returns a pointer to a member variable of class MR::DecimateSettings named partsMode. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_partsMode().

◆ preCollapse()

meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref meshlib.DecimateSettings.preCollapse ( )

The user can provide this optional callback that is invoked immediately before edge collapse;.

It receives the edge being collapsed: its destination vertex will disappear, and its origin vertex will get new position (provided as the second argument) after collapse; If the callback returns false, then the collapse is prohibited

Returns a pointer to a member variable of class MR::DecimateSettings named preCollapse. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_preCollapse().

◆ preventNormalFlips()

boolean meshlib.DecimateSettings.preventNormalFlips ( )

whether to prohibit a collapse if it inverts the normal of a remaining triangle, or folds two triangles onto each other; turning it off (together with maxTriangleAspectRatio = FLT_MAX) makes decimation faster, but some triangles may appear inverted Returns a pointer to a member variable of class MR::DecimateSettings named preventNormalFlips. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_preventNormalFlips().

◆ progressCallback()

meshlib.std_function_bool_from_float meshlib.DecimateSettings.progressCallback ( )

callback to report algorithm progress and cancel it by user request Returns a pointer to a member variable of class MR::DecimateSettings named progressCallback. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_progressCallback().

◆ region()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.region ( )

Region on mesh to be decimated, it is updated during the operation Returns a pointer to a member variable of class MR::DecimateSettings named region. The reference to this object might be preserved as the return value.

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

◆ regionEdges()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.regionEdges ( )

if region is not null and this pointer is not null, then it shall contain all edges incident to region faces (as returned by getIncidentEdges( topology, *region )), and the algorithm does not compute them itself Returns a pointer to a member variable of class MR::DecimateSettings named regionEdges. The reference to this object might be preserved as the return value.

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

◆ setAdjustCollapse()

void meshlib.DecimateSettings.setAdjustCollapse ( meshlib.std_function_void_from_MR_UndirectedEdgeId_float_ref_MR_Vector3f_ref value)

The user can provide this optional callback for adjusting error introduced by this edge collapse and the collapse position.

On input the callback gets the squared error and position computed by standard means, and callback can modify any of them. The larger the error, the later this edge will be collapsed. This callback can be called from many threads in parallel and must be thread-safe. This callback can be called many times for each edge before real collapsing, and it is important to make the same adjustment.

Modifies a member variable of class MR::DecimateSettings named adjustCollapse. The reference to the parameter value might be preserved in this object in element adjustCollapse.

Calls MR_DecimateSettings_Set_adjustCollapse().

◆ setAngleWeightedDistToPlane()

void meshlib.DecimateSettings.setAngleWeightedDistToPlane ( boolean value)

if false, then quadratic error metric is equal to the sum of distances to the planes of original mesh triangles; if true, then the sum is weighted, and the weight is equal to the angle of adjacent triangle at the vertex divided on PI (to get one after summing all 3 vertices of the triangle) Modifies a member variable of class MR::DecimateSettings named angleWeightedDistToPlane.

Calls MR_DecimateSettings_Set_angleWeightedDistToPlane().

◆ setBdVerts()

void meshlib.DecimateSettings.setBdVerts ( meshlib.VertBitSet value)

if touchNearBdEdges=false or touchBdVerts=false then the algorithm needs to know about all boundary vertices; if the pointer is not null then boundary vertices detection is replaced with testing values in this bit-set; the algorithm updates this set if it packs the mesh Modifies a member variable of class MR::DecimateSettings named bdVerts. The reference to the parameter value might be preserved in this object in element bdVerts.

Calls MR_DecimateSettings_Set_bdVerts().

◆ setCollapseNearNotFlippable()

void meshlib.DecimateSettings.setCollapseNearNotFlippable ( boolean value)

Whether to allow collapse of edges incident to notFlippable edges, which can move vertices of notFlippable edges unless they are fixed Modifies a member variable of class MR::DecimateSettings named collapseNearNotFlippable.

Calls MR_DecimateSettings_Set_collapseNearNotFlippable().

◆ setCriticalTriAspectRatio()

void meshlib.DecimateSettings.setCriticalTriAspectRatio ( float value)

the algorithm will ignore dihedral angle check if one of triangles had aspect ratio equal or more than this value; and the algorithm will permit temporary increase in aspect ratio after collapse, if before collapse one of the triangles had larger aspect ratio Modifies a member variable of class MR::DecimateSettings named criticalTriAspectRatio.

Calls MR_DecimateSettings_Set_criticalTriAspectRatio().

◆ setDecimateBetweenParts()

void meshlib.DecimateSettings.setDecimateBetweenParts ( boolean value)

Whether to decimate near the borders of individual parts to eliminate small edges there: as soon as two sibling nodes in the binary tree of parts are decimated, their union is decimated in parallel with other nodes, and only the border between two halves of the mesh remains for the final decimation of whole mesh region Modifies a member variable of class MR::DecimateSettings named decimateBetweenParts.

Calls MR_DecimateSettings_Set_decimateBetweenParts().

◆ setEdgesToCollapse()

void meshlib.DecimateSettings.setEdgesToCollapse ( meshlib.UndirectedEdgeBitSet value)

If pointer is not null, then only edges from here can be collapsed (and some nearby edges can disappear); the algorithm updates this map during collapses, removing or replacing elements Modifies a member variable of class MR::DecimateSettings named edgesToCollapse. The reference to the parameter value might be preserved in this object in element edgesToCollapse.

Calls MR_DecimateSettings_Set_edgesToCollapse().

◆ setMaxAngleChange()

void meshlib.DecimateSettings.setMaxAngleChange ( float value)

Permit edge flips (in addition to collapsing) to improve Delone quality of the mesh if it does not change dihedral angle more than on this value (negative value prohibits any edge flips) Modifies a member variable of class MR::DecimateSettings named maxAngleChange.

Calls MR_DecimateSettings_Set_maxAngleChange().

◆ setMaxBdShift()

void meshlib.DecimateSettings.setMaxBdShift ( float value)

Maximal shift of a boundary during one edge collapse Modifies a member variable of class MR::DecimateSettings named maxBdShift.

Calls MR_DecimateSettings_Set_maxBdShift().

◆ setMaxDeletedFaces()

void meshlib.DecimateSettings.setMaxDeletedFaces ( int value)

Limit on the number of deleted faces Modifies a member variable of class MR::DecimateSettings named maxDeletedFaces.

Calls MR_DecimateSettings_Set_maxDeletedFaces().

◆ setMaxDeletedVertices()

void meshlib.DecimateSettings.setMaxDeletedVertices ( int value)

Limit on the number of deleted vertices Modifies a member variable of class MR::DecimateSettings named maxDeletedVertices.

Calls MR_DecimateSettings_Set_maxDeletedVertices().

◆ setMaxEdgeLen()

void meshlib.DecimateSettings.setMaxEdgeLen ( float value)

Maximal possible edge length created during decimation Modifies a member variable of class MR::DecimateSettings named maxEdgeLen.

Calls MR_DecimateSettings_Set_maxEdgeLen().

◆ setMaxError()

void meshlib.DecimateSettings.setMaxError ( float value)

for DecimateStrategy.MinimizeError: stop the decimation as soon as the estimated distance deviation from the original mesh is more than this value for DecimateStrategy.ShortestEdgeFirst only: stop the decimation as soon as the shortest edge in the mesh is greater than this value Modifies a member variable of class MR::DecimateSettings named maxError.

Calls MR_DecimateSettings_Set_maxError().

◆ setMaxTriangleAspectRatio()

void meshlib.DecimateSettings.setMaxTriangleAspectRatio ( float value)

Maximal possible aspect ratio of a triangle introduced during decimation Modifies a member variable of class MR::DecimateSettings named maxTriangleAspectRatio.

Calls MR_DecimateSettings_Set_maxTriangleAspectRatio().

◆ setMinFacesInPart()

void meshlib.DecimateSettings.setMinFacesInPart ( int value)

minimum number of faces in one subdivision part for ( subdivideParts > 1 ) mode Modifies a member variable of class MR::DecimateSettings named minFacesInPart.

Calls MR_DecimateSettings_Set_minFacesInPart().

◆ setNotFlippable()

void meshlib.DecimateSettings.setNotFlippable ( meshlib.UndirectedEdgeBitSet value)

Edges specified by this bit-set will never be flipped, but they can be collapsed or replaced during collapse of nearby edges so it is updated during the operation Modifies a member variable of class MR::DecimateSettings named notFlippable. The reference to the parameter value might be preserved in this object in element notFlippable.

Calls MR_DecimateSettings_Set_notFlippable().

◆ setOnEdgeDel()

void meshlib.DecimateSettings.setOnEdgeDel ( meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId value)

this function is called each time edge (del) is deleted; if valid (rem) is given then dest(del) = dest(rem) and their origins are in different ends of collapsing edge, (rem) shall take the place of (del) Modifies a member variable of class MR::DecimateSettings named onEdgeDel. The reference to the parameter value might be preserved in this object in element onEdgeDel.

Calls MR_DecimateSettings_Set_onEdgeDel().

◆ setOptimizeVertexPos()

void meshlib.DecimateSettings.setOptimizeVertexPos ( boolean value)

if true then after each edge collapse the position of remaining vertex is optimized to minimize local shape change, if false then the edge is collapsed in one of its vertices, which keeps its position Modifies a member variable of class MR::DecimateSettings named optimizeVertexPos.

Calls MR_DecimateSettings_Set_optimizeVertexPos().

◆ setPackMesh()

void meshlib.DecimateSettings.setPackMesh ( boolean value)

whether to pack mesh at the end Modifies a member variable of class MR::DecimateSettings named packMesh.

Calls MR_DecimateSettings_Set_packMesh().

◆ setPartFaces()

void meshlib.DecimateSettings.setPartFaces ( meshlib.std_vector_MR_FaceBitSet value)

if not null, then it contains the faces of each subdivision part on input, which must not overlap, and after decimation of all parts, the region inside each part is put here; decimateBetweenParts=true or packMesh=true are not compatible with this option Modifies a member variable of class MR::DecimateSettings named partFaces. The reference to the parameter value might be preserved in this object in element partFaces.

Calls MR_DecimateSettings_Set_partFaces().

◆ setPartsMode()

void meshlib.DecimateSettings.setPartsMode ( meshlib.DecimatePartsMode value)

how the parts are found for subdivideParts > 1; ignored if partFaces is given Modifies a member variable of class MR::DecimateSettings named partsMode. The reference to the parameter value might be preserved in this object in element partsMode.

Calls MR_DecimateSettings_Set_partsMode().

◆ setPreCollapse()

void meshlib.DecimateSettings.setPreCollapse ( meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref value)

The user can provide this optional callback that is invoked immediately before edge collapse;.

It receives the edge being collapsed: its destination vertex will disappear, and its origin vertex will get new position (provided as the second argument) after collapse; If the callback returns false, then the collapse is prohibited

Modifies a member variable of class MR::DecimateSettings named preCollapse. The reference to the parameter value might be preserved in this object in element preCollapse.

Calls MR_DecimateSettings_Set_preCollapse().

◆ setPreventNormalFlips()

void meshlib.DecimateSettings.setPreventNormalFlips ( boolean value)

whether to prohibit a collapse if it inverts the normal of a remaining triangle, or folds two triangles onto each other; turning it off (together with maxTriangleAspectRatio = FLT_MAX) makes decimation faster, but some triangles may appear inverted Modifies a member variable of class MR::DecimateSettings named preventNormalFlips.

Calls MR_DecimateSettings_Set_preventNormalFlips().

◆ setProgressCallback()

void meshlib.DecimateSettings.setProgressCallback ( meshlib.std_function_bool_from_float value)

callback to report algorithm progress and cancel it by user request Modifies a member variable of class MR::DecimateSettings named progressCallback. The reference to the parameter value might be preserved in this object in element progressCallback.

Calls MR_DecimateSettings_Set_progressCallback().

◆ setRegion()

void meshlib.DecimateSettings.setRegion ( meshlib.FaceBitSet value)

Region on mesh to be decimated, it is updated during the operation Modifies a member variable of class MR::DecimateSettings named region. The reference to the parameter value might be preserved in this object in element region.

Calls MR_DecimateSettings_Set_region().

◆ setRegionEdges()

void meshlib.DecimateSettings.setRegionEdges ( meshlib.UndirectedEdgeBitSet value)

if region is not null and this pointer is not null, then it shall contain all edges incident to region faces (as returned by getIncidentEdges( topology, *region )), and the algorithm does not compute them itself Modifies a member variable of class MR::DecimateSettings named regionEdges. The reference to the parameter value might be preserved in this object in element regionEdges.

Calls MR_DecimateSettings_Set_regionEdges().

◆ setStabilizer()

void meshlib.DecimateSettings.setStabilizer ( float value)

Small stabilizer is important to achieve good results on completely planar mesh parts, if your mesh is not-planer everywhere, then you can set it to zero Modifies a member variable of class MR::DecimateSettings named stabilizer.

Calls MR_DecimateSettings_Set_stabilizer().

◆ setStrategy()

void meshlib.DecimateSettings.setStrategy ( meshlib.DecimateStrategy value)

Modifies a member variable of class MR::DecimateSettings named strategy. The reference to the parameter value might be preserved in this object in element strategy.

Calls MR_DecimateSettings_Set_strategy().

◆ setSubdivideParts()

void meshlib.DecimateSettings.setSubdivideParts ( int value)

If this value is more than 1, then virtually subdivides the mesh on given number of parts to process them in parallel (using many threads); IMPORTANT: with default partsMode, please call mesh.packOptimally() before calling decimating with subdivideParts > 1, otherwise performance will be bad Modifies a member variable of class MR::DecimateSettings named subdivideParts.

Calls MR_DecimateSettings_Set_subdivideParts().

◆ setTinyEdgeLength()

void meshlib.DecimateSettings.setTinyEdgeLength ( float value)

edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio Modifies a member variable of class MR::DecimateSettings named tinyEdgeLength.

Calls MR_DecimateSettings_Set_tinyEdgeLength().

◆ setTouchBdVerts()

void meshlib.DecimateSettings.setTouchBdVerts ( boolean value)

touchBdVerts=true: allow moving and eliminating boundary vertices during edge collapses; touchBdVerts=false: allow only collapsing an edge having only one boundary vertex in that vertex, so position and count of boundary vertices do not change; this setting is ignored if touchNearBdEdges=false Modifies a member variable of class MR::DecimateSettings named touchBdVerts.

Calls MR_DecimateSettings_Set_touchBdVerts().

◆ setTouchNearBdEdges()

void meshlib.DecimateSettings.setTouchNearBdEdges ( boolean value)

Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary Modifies a member variable of class MR::DecimateSettings named touchNearBdEdges.

Calls MR_DecimateSettings_Set_touchNearBdEdges().

◆ setTwinMap()

if an edge present as a key in this map is flipped or collapsed, then same happens to the value-edge (with same collapse position); the algorithm updates this map during collapses, removing or replacing elements Modifies a member variable of class MR::DecimateSettings named twinMap. The reference to the parameter value might be preserved in this object in element twinMap.

Calls MR_DecimateSettings_Set_twinMap().

◆ setVertForms()

void meshlib.DecimateSettings.setVertForms ( meshlib.Vector_MR_QuadraticForm3f_MR_VertId value)

If not null, then vertex quadratic forms are stored there; if on input the vector is not empty then initialization is skipped in favor of values from there; on output: quadratic form for each remaining vertex is returned there.

Modifies a member variable of class MR::DecimateSettings named vertForms. The reference to the parameter value might be preserved in this object in element vertForms.

Calls MR_DecimateSettings_Set_vertForms().

◆ stabilizer()

float meshlib.DecimateSettings.stabilizer ( )

Small stabilizer is important to achieve good results on completely planar mesh parts, if your mesh is not-planer everywhere, then you can set it to zero Returns a pointer to a member variable of class MR::DecimateSettings named stabilizer. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_stabilizer().

◆ strategy()

meshlib.DecimateStrategy meshlib.DecimateSettings.strategy ( )

Returns a pointer to a member variable of class MR::DecimateSettings named strategy. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_strategy().

◆ subdivideParts()

int meshlib.DecimateSettings.subdivideParts ( )

If this value is more than 1, then virtually subdivides the mesh on given number of parts to process them in parallel (using many threads); IMPORTANT: with default partsMode, please call mesh.packOptimally() before calling decimating with subdivideParts > 1, otherwise performance will be bad Returns a pointer to a member variable of class MR::DecimateSettings named subdivideParts. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_subdivideParts().

◆ tinyEdgeLength()

float meshlib.DecimateSettings.tinyEdgeLength ( )

edges not longer than this value will be collapsed even if it results in appearance of a triangle with high aspect ratio Returns a pointer to a member variable of class MR::DecimateSettings named tinyEdgeLength. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_tinyEdgeLength().

◆ touchBdVerts()

boolean meshlib.DecimateSettings.touchBdVerts ( )

touchBdVerts=true: allow moving and eliminating boundary vertices during edge collapses; touchBdVerts=false: allow only collapsing an edge having only one boundary vertex in that vertex, so position and count of boundary vertices do not change; this setting is ignored if touchNearBdEdges=false Returns a pointer to a member variable of class MR::DecimateSettings named touchBdVerts. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_touchBdVerts().

◆ touchNearBdEdges()

boolean meshlib.DecimateSettings.touchNearBdEdges ( )

Whether to allow collapsing or flipping edges having at least one vertex on (region) boundary Returns a pointer to a member variable of class MR::DecimateSettings named touchNearBdEdges. The reference to this object might be preserved as the return value.

Calls MR_DecimateSettings_Get_touchNearBdEdges().

◆ twinMap()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.twinMap ( )

if an edge present as a key in this map is flipped or collapsed, then same happens to the value-edge (with same collapse position); the algorithm updates this map during collapses, removing or replacing elements Returns a pointer to a member variable of class MR::DecimateSettings named twinMap. The reference to this object might be preserved as the return value.

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

◆ vertForms()

java.lang.foreign.MemorySegment meshlib.DecimateSettings.vertForms ( )

If not null, then vertex quadratic forms are stored there; if on input the vector is not empty then initialization is skipped in favor of values from there; on output: quadratic form for each remaining vertex is returned there.

Returns a pointer to a member variable of class MR::DecimateSettings named vertForms. The reference to this object might be preserved as the return value.

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


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