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

Public Member Functions

 RemeshSettings (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 RemeshSettings ()
 RemeshSettings (float targetEdgeLen, int maxEdgeSplits, float maxAngleChangeAfterFlip, boolean frozenBoundary, float maxBdShift, boolean useCurvature, float maxSplittableTriAspectRatio, int finalRelaxIters, boolean finalRelaxNoShrinkage, meshlib.FaceBitSet region, meshlib.UndirectedEdgeBitSet notFlippable, boolean packMesh, boolean projectOnOriginalMesh, meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeSplit, meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeDel, meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref preCollapse, meshlib.std_function_bool_from_float progressCallback)
 RemeshSettings (meshlib.RemeshSettings _other)
meshlib.RemeshSettings assignFromAnother (meshlib.RemeshSettings _other)
float targetEdgeLen ()
void setTargetEdgeLen (float value)
int maxEdgeSplits ()
void setMaxEdgeSplits (int value)
float maxAngleChangeAfterFlip ()
void setMaxAngleChangeAfterFlip (float value)
boolean frozenBoundary ()
void setFrozenBoundary (boolean value)
float maxBdShift ()
void setMaxBdShift (float value)
boolean useCurvature ()
void setUseCurvature (boolean value)
float maxSplittableTriAspectRatio ()
void setMaxSplittableTriAspectRatio (float value)
int finalRelaxIters ()
void setFinalRelaxIters (int value)
boolean finalRelaxNoShrinkage ()
void setFinalRelaxNoShrinkage (boolean value)
java.lang.foreign.MemorySegment region ()
void setRegion (meshlib.FaceBitSet value)
java.lang.foreign.MemorySegment notFlippable ()
void setNotFlippable (meshlib.UndirectedEdgeBitSet value)
boolean packMesh ()
void setPackMesh (boolean value)
boolean projectOnOriginalMesh ()
void setProjectOnOriginalMesh (boolean value)
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeSplit ()
void setOnEdgeSplit (meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId value)
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeDel ()
void setOnEdgeDel (meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId 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_bool_from_float progressCallback ()
void setProgressCallback (meshlib.std_function_bool_from_float 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)

Detailed Description

Generated from class MR::RemeshSettings.

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

Constructor & Destructor Documentation

◆ RemeshSettings() [1/4]

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

◆ RemeshSettings() [2/4]

meshlib.RemeshSettings.RemeshSettings ( )

Constructs an empty (default-constructed) instance.

Calls MR_RemeshSettings_DefaultConstruct().

◆ RemeshSettings() [3/4]

meshlib.RemeshSettings.RemeshSettings ( float targetEdgeLen,
int maxEdgeSplits,
float maxAngleChangeAfterFlip,
boolean frozenBoundary,
float maxBdShift,
boolean useCurvature,
float maxSplittableTriAspectRatio,
int finalRelaxIters,
boolean finalRelaxNoShrinkage,
meshlib.FaceBitSet region,
meshlib.UndirectedEdgeBitSet notFlippable,
boolean packMesh,
boolean projectOnOriginalMesh,
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeSplit,
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeDel,
meshlib.std_function_bool_from_MR_EdgeId_const_MR_Vector3f_ref preCollapse,
meshlib.std_function_bool_from_float progressCallback )

Constructs MR::RemeshSettings elementwise. 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 onEdgeSplit 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 preCollapse might be preserved in the constructed object. The reference to the parameter progressCallback might be preserved in the constructed object.

Calls MR_RemeshSettings_ConstructFrom().

◆ RemeshSettings() [4/4]

meshlib.RemeshSettings.RemeshSettings ( meshlib.RemeshSettings _other)

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

Calls MR_RemeshSettings_ConstructFromAnother().

Member Function Documentation

◆ assignFromAnother()

meshlib.RemeshSettings meshlib.RemeshSettings.assignFromAnother ( meshlib.RemeshSettings _other)

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

Calls MR_RemeshSettings_AssignFromAnother().

◆ finalRelaxIters()

int meshlib.RemeshSettings.finalRelaxIters ( )

the number of iterations of final relaxation of mesh vertices; few iterations can give almost perfect uniformity of the vertices and edge lengths but deviate from the original surface Returns a pointer to a member variable of class MR::RemeshSettings named finalRelaxIters. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_finalRelaxIters().

◆ finalRelaxNoShrinkage()

boolean meshlib.RemeshSettings.finalRelaxNoShrinkage ( )

if true prevents the surface from shrinkage after many iterations Returns a pointer to a member variable of class MR::RemeshSettings named finalRelaxNoShrinkage. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_finalRelaxNoShrinkage().

◆ frozenBoundary()

boolean meshlib.RemeshSettings.frozenBoundary ( )

Allows or prohibits splitting and/or collapse boundary edges it recommended to keep default value here for better quality Returns a pointer to a member variable of class MR::RemeshSettings named frozenBoundary. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_frozenBoundary().

◆ maxAngleChangeAfterFlip()

float meshlib.RemeshSettings.maxAngleChangeAfterFlip ( )

Improves local mesh triangulation by doing edge flips if it does not change dihedral angle more than on this value Returns a pointer to a member variable of class MR::RemeshSettings named maxAngleChangeAfterFlip. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_maxAngleChangeAfterFlip().

◆ maxBdShift()

float meshlib.RemeshSettings.maxBdShift ( )

Maximal shift of a boundary during one edge collapse only makes sense if frozenBoundary=false Returns a pointer to a member variable of class MR::RemeshSettings named maxBdShift. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_maxBdShift().

◆ maxEdgeSplits()

int meshlib.RemeshSettings.maxEdgeSplits ( )

Maximum number of edge splits allowed during subdivision Returns a pointer to a member variable of class MR::RemeshSettings named maxEdgeSplits. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_maxEdgeSplits().

◆ maxSplittableTriAspectRatio()

float meshlib.RemeshSettings.maxSplittableTriAspectRatio ( )

An edge is subdivided only if both its left and right triangles have aspect ratio below or equal to this value. So this is a maximum aspect ratio of a triangle that can be split on two before Delone optimization. Please set it to a smaller value only if frozenBoundary==true, otherwise many narrow triangles can appear near border Returns a pointer to a member variable of class MR::RemeshSettings named maxSplittableTriAspectRatio. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_maxSplittableTriAspectRatio().

◆ notFlippable()

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

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

Calls MR_RemeshSettings_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.RemeshSettings.onEdgeDel ( )

if valid (e1) is given then dest(e) = dest(e1) and their origins are in different ends of collapsing edge, e1 shall take the place of e Returns a pointer to a member variable of class MR::RemeshSettings named onEdgeDel. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_onEdgeDel().

◆ onEdgeSplit()

meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId meshlib.RemeshSettings.onEdgeSplit ( )

this function is called each time edge (e) is split into (e1->e), but before the ring is made Delone Returns a pointer to a member variable of class MR::RemeshSettings named onEdgeSplit. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_onEdgeSplit().

◆ packMesh()

boolean meshlib.RemeshSettings.packMesh ( )

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

Calls MR_RemeshSettings_Get_packMesh().

◆ 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::RemeshSettings named preCollapse. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_preCollapse().

◆ progressCallback()

meshlib.std_function_bool_from_float meshlib.RemeshSettings.progressCallback ( )

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

Calls MR_RemeshSettings_Get_progressCallback().

◆ projectOnOriginalMesh()

boolean meshlib.RemeshSettings.projectOnOriginalMesh ( )

if true, then every new vertex after subdivision will be projected on the original mesh (before smoothing); this does not affect the vertices moved on other stages of the processing Returns a pointer to a member variable of class MR::RemeshSettings named projectOnOriginalMesh. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_projectOnOriginalMesh().

◆ region()

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

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

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

◆ setFinalRelaxIters()

void meshlib.RemeshSettings.setFinalRelaxIters ( int value)

the number of iterations of final relaxation of mesh vertices; few iterations can give almost perfect uniformity of the vertices and edge lengths but deviate from the original surface Modifies a member variable of class MR::RemeshSettings named finalRelaxIters.

Calls MR_RemeshSettings_Set_finalRelaxIters().

◆ setFinalRelaxNoShrinkage()

void meshlib.RemeshSettings.setFinalRelaxNoShrinkage ( boolean value)

if true prevents the surface from shrinkage after many iterations Modifies a member variable of class MR::RemeshSettings named finalRelaxNoShrinkage.

Calls MR_RemeshSettings_Set_finalRelaxNoShrinkage().

◆ setFrozenBoundary()

void meshlib.RemeshSettings.setFrozenBoundary ( boolean value)

Allows or prohibits splitting and/or collapse boundary edges it recommended to keep default value here for better quality Modifies a member variable of class MR::RemeshSettings named frozenBoundary.

Calls MR_RemeshSettings_Set_frozenBoundary().

◆ setMaxAngleChangeAfterFlip()

void meshlib.RemeshSettings.setMaxAngleChangeAfterFlip ( float value)

Improves local mesh triangulation by doing edge flips if it does not change dihedral angle more than on this value Modifies a member variable of class MR::RemeshSettings named maxAngleChangeAfterFlip.

Calls MR_RemeshSettings_Set_maxAngleChangeAfterFlip().

◆ setMaxBdShift()

void meshlib.RemeshSettings.setMaxBdShift ( float value)

Maximal shift of a boundary during one edge collapse only makes sense if frozenBoundary=false Modifies a member variable of class MR::RemeshSettings named maxBdShift.

Calls MR_RemeshSettings_Set_maxBdShift().

◆ setMaxEdgeSplits()

void meshlib.RemeshSettings.setMaxEdgeSplits ( int value)

Maximum number of edge splits allowed during subdivision Modifies a member variable of class MR::RemeshSettings named maxEdgeSplits.

Calls MR_RemeshSettings_Set_maxEdgeSplits().

◆ setMaxSplittableTriAspectRatio()

void meshlib.RemeshSettings.setMaxSplittableTriAspectRatio ( float value)

An edge is subdivided only if both its left and right triangles have aspect ratio below or equal to this value. So this is a maximum aspect ratio of a triangle that can be split on two before Delone optimization. Please set it to a smaller value only if frozenBoundary==true, otherwise many narrow triangles can appear near border Modifies a member variable of class MR::RemeshSettings named maxSplittableTriAspectRatio.

Calls MR_RemeshSettings_Set_maxSplittableTriAspectRatio().

◆ setNotFlippable()

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

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

Calls MR_RemeshSettings_Set_notFlippable().

◆ setOnEdgeDel()

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

if valid (e1) is given then dest(e) = dest(e1) and their origins are in different ends of collapsing edge, e1 shall take the place of e Modifies a member variable of class MR::RemeshSettings named onEdgeDel. The reference to the parameter value might be preserved in this object in element onEdgeDel.

Calls MR_RemeshSettings_Set_onEdgeDel().

◆ setOnEdgeSplit()

void meshlib.RemeshSettings.setOnEdgeSplit ( meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId value)

this function is called each time edge (e) is split into (e1->e), but before the ring is made Delone Modifies a member variable of class MR::RemeshSettings named onEdgeSplit. The reference to the parameter value might be preserved in this object in element onEdgeSplit.

Calls MR_RemeshSettings_Set_onEdgeSplit().

◆ setPackMesh()

void meshlib.RemeshSettings.setPackMesh ( boolean value)

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

Calls MR_RemeshSettings_Set_packMesh().

◆ setPreCollapse()

void meshlib.RemeshSettings.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::RemeshSettings named preCollapse. The reference to the parameter value might be preserved in this object in element preCollapse.

Calls MR_RemeshSettings_Set_preCollapse().

◆ setProgressCallback()

void meshlib.RemeshSettings.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::RemeshSettings named progressCallback. The reference to the parameter value might be preserved in this object in element progressCallback.

Calls MR_RemeshSettings_Set_progressCallback().

◆ setProjectOnOriginalMesh()

void meshlib.RemeshSettings.setProjectOnOriginalMesh ( boolean value)

if true, then every new vertex after subdivision will be projected on the original mesh (before smoothing); this does not affect the vertices moved on other stages of the processing Modifies a member variable of class MR::RemeshSettings named projectOnOriginalMesh.

Calls MR_RemeshSettings_Set_projectOnOriginalMesh().

◆ setRegion()

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

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

Calls MR_RemeshSettings_Set_region().

◆ setTargetEdgeLen()

void meshlib.RemeshSettings.setTargetEdgeLen ( float value)

the algorithm will try to keep the length of all edges close to this value, splitting the edges longer than targetEdgeLen, and then eliminating the edges shorter than targetEdgeLen Modifies a member variable of class MR::RemeshSettings named targetEdgeLen.

Calls MR_RemeshSettings_Set_targetEdgeLen().

◆ setUseCurvature()

void meshlib.RemeshSettings.setUseCurvature ( boolean value)

This option in subdivision works best for natural surfaces, where all triangles are close to equilateral and have similar area, and no sharp edges in between Modifies a member variable of class MR::RemeshSettings named useCurvature.

Calls MR_RemeshSettings_Set_useCurvature().

◆ targetEdgeLen()

float meshlib.RemeshSettings.targetEdgeLen ( )

the algorithm will try to keep the length of all edges close to this value, splitting the edges longer than targetEdgeLen, and then eliminating the edges shorter than targetEdgeLen Returns a pointer to a member variable of class MR::RemeshSettings named targetEdgeLen. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_targetEdgeLen().

◆ useCurvature()

boolean meshlib.RemeshSettings.useCurvature ( )

This option in subdivision works best for natural surfaces, where all triangles are close to equilateral and have similar area, and no sharp edges in between Returns a pointer to a member variable of class MR::RemeshSettings named useCurvature. The reference to this object might be preserved as the return value.

Calls MR_RemeshSettings_Get_useCurvature().


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