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

Public Member Functions

 SubdivideSettings (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 SubdivideSettings ()
 SubdivideSettings (float maxEdgeLen, float curvaturePriority, int maxEdgeSplits, float maxDeviationAfterFlip, float maxAngleChangeAfterFlip, float criticalAspectRatioFlip, meshlib.FaceBitSet region, meshlib.FaceBitSet maintainRegion, meshlib.UndirectedEdgeBitSet notFlippable, boolean onlyNearNotFlippable, meshlib.VertBitSet newVerts, boolean subdivideBorder, float maxTriAspectRatio, float maxSplittableTriAspectRatio, boolean smoothMode, float minSharpDihedralAngle, boolean projectOnOriginalMesh, meshlib.std_function_bool_from_MR_EdgeId beforeEdgeSplit, meshlib.std_function_void_from_MR_VertId onVertCreated, meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeSplit, meshlib.std_function_bool_from_float progressCallback)
 SubdivideSettings (meshlib.SubdivideSettings _other)
meshlib.SubdivideSettings assignFromAnother (meshlib.SubdivideSettings _other)
float maxEdgeLen ()
void setMaxEdgeLen (float value)
float curvaturePriority ()
void setCurvaturePriority (float value)
int maxEdgeSplits ()
void setMaxEdgeSplits (int value)
float maxDeviationAfterFlip ()
void setMaxDeviationAfterFlip (float value)
float maxAngleChangeAfterFlip ()
void setMaxAngleChangeAfterFlip (float value)
float criticalAspectRatioFlip ()
void setCriticalAspectRatioFlip (float value)
java.lang.foreign.MemorySegment region ()
void setRegion (meshlib.FaceBitSet value)
java.lang.foreign.MemorySegment maintainRegion ()
void setMaintainRegion (meshlib.FaceBitSet value)
java.lang.foreign.MemorySegment notFlippable ()
void setNotFlippable (meshlib.UndirectedEdgeBitSet value)
boolean onlyNearNotFlippable ()
void setOnlyNearNotFlippable (boolean value)
java.lang.foreign.MemorySegment newVerts ()
void setNewVerts (meshlib.VertBitSet value)
boolean subdivideBorder ()
void setSubdivideBorder (boolean value)
float maxTriAspectRatio ()
void setMaxTriAspectRatio (float value)
float maxSplittableTriAspectRatio ()
void setMaxSplittableTriAspectRatio (float value)
boolean smoothMode ()
void setSmoothMode (boolean value)
float minSharpDihedralAngle ()
void setMinSharpDihedralAngle (float value)
boolean projectOnOriginalMesh ()
void setProjectOnOriginalMesh (boolean value)
meshlib.std_function_bool_from_MR_EdgeId beforeEdgeSplit ()
void setBeforeEdgeSplit (meshlib.std_function_bool_from_MR_EdgeId value)
meshlib.std_function_void_from_MR_VertId onVertCreated ()
void setOnVertCreated (meshlib.std_function_void_from_MR_VertId 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_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::SubdivideSettings.

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

Constructor & Destructor Documentation

◆ SubdivideSettings() [1/4]

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

◆ SubdivideSettings() [2/4]

meshlib.SubdivideSettings.SubdivideSettings ( )

Constructs an empty (default-constructed) instance.

Calls MR_SubdivideSettings_DefaultConstruct().

◆ SubdivideSettings() [3/4]

meshlib.SubdivideSettings.SubdivideSettings ( float maxEdgeLen,
float curvaturePriority,
int maxEdgeSplits,
float maxDeviationAfterFlip,
float maxAngleChangeAfterFlip,
float criticalAspectRatioFlip,
meshlib.FaceBitSet region,
meshlib.FaceBitSet maintainRegion,
meshlib.UndirectedEdgeBitSet notFlippable,
boolean onlyNearNotFlippable,
meshlib.VertBitSet newVerts,
boolean subdivideBorder,
float maxTriAspectRatio,
float maxSplittableTriAspectRatio,
boolean smoothMode,
float minSharpDihedralAngle,
boolean projectOnOriginalMesh,
meshlib.std_function_bool_from_MR_EdgeId beforeEdgeSplit,
meshlib.std_function_void_from_MR_VertId onVertCreated,
meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId onEdgeSplit,
meshlib.std_function_bool_from_float progressCallback )

Constructs MR::SubdivideSettings elementwise. The reference to the parameter region might be preserved in the constructed object. The reference to the parameter maintainRegion 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 newVerts might be preserved in the constructed object. The reference to the parameter beforeEdgeSplit might be preserved in the constructed object. The reference to the parameter onVertCreated 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 progressCallback might be preserved in the constructed object.

Calls MR_SubdivideSettings_ConstructFrom().

◆ SubdivideSettings() [4/4]

meshlib.SubdivideSettings.SubdivideSettings ( meshlib.SubdivideSettings _other)

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

Calls MR_SubdivideSettings_ConstructFromAnother().

Member Function Documentation

◆ assignFromAnother()

meshlib.SubdivideSettings meshlib.SubdivideSettings.assignFromAnother ( meshlib.SubdivideSettings _other)

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

Calls MR_SubdivideSettings_AssignFromAnother().

◆ beforeEdgeSplit()

meshlib.std_function_bool_from_MR_EdgeId meshlib.SubdivideSettings.beforeEdgeSplit ( )

this function is called each time edge (e) is going to split, if it returns false then this split will be skipped Returns a pointer to a member variable of class MR::SubdivideSettings named beforeEdgeSplit. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_beforeEdgeSplit().

◆ criticalAspectRatioFlip()

float meshlib.SubdivideSettings.criticalAspectRatioFlip ( )

If this value is less than FLT_MAX then edge flips will ignore dihedral angle check if one of triangles has aspect ratio more than this value Unit: rad Returns a pointer to a member variable of class MR::SubdivideSettings named criticalAspectRatioFlip. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_criticalAspectRatioFlip().

◆ curvaturePriority()

float meshlib.SubdivideSettings.curvaturePriority ( )

edge length will be magnified by the squared difference of normals at edge's ends times this factor, thus subdivision will be finer in the regions of high curvature compared to planar regions Returns a pointer to a member variable of class MR::SubdivideSettings named curvaturePriority. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_curvaturePriority().

◆ maintainRegion()

java.lang.foreign.MemorySegment meshlib.SubdivideSettings.maintainRegion ( )

Additional region to update during subdivision: if a face from here is split, it is replaced with new sub-faces; note that Subdivide can split faces even outside of main region, so it might be necessary to update another region Returns a pointer to a member variable of class MR::SubdivideSettings named maintainRegion. The reference to this object might be preserved as the return value.

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

◆ maxAngleChangeAfterFlip()

float meshlib.SubdivideSettings.maxAngleChangeAfterFlip ( )

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

Calls MR_SubdivideSettings_Get_maxAngleChangeAfterFlip().

◆ maxDeviationAfterFlip()

float meshlib.SubdivideSettings.maxDeviationAfterFlip ( )

Improves local mesh triangulation by doing edge flips if it does not make too big surface deviation Returns a pointer to a member variable of class MR::SubdivideSettings named maxDeviationAfterFlip. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_maxDeviationAfterFlip().

◆ maxEdgeLen()

float meshlib.SubdivideSettings.maxEdgeLen ( )

Subdivision is stopped when all edges inside or on the boundary of the region are not longer than this value Returns a pointer to a member variable of class MR::SubdivideSettings named maxEdgeLen. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_maxEdgeLen().

◆ maxEdgeSplits()

int meshlib.SubdivideSettings.maxEdgeSplits ( )

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

Calls MR_SubdivideSettings_Get_maxEdgeSplits().

◆ maxSplittableTriAspectRatio()

float meshlib.SubdivideSettings.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 subdivideBorder==false, otherwise many narrow triangles can appear near border Returns a pointer to a member variable of class MR::SubdivideSettings named maxSplittableTriAspectRatio. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_maxSplittableTriAspectRatio().

◆ maxTriAspectRatio()

float meshlib.SubdivideSettings.maxTriAspectRatio ( )

The subdivision stops as soon as all triangles (in the region) have aspect ratio below or equal to this value Returns a pointer to a member variable of class MR::SubdivideSettings named maxTriAspectRatio. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_maxTriAspectRatio().

◆ minSharpDihedralAngle()

float meshlib.SubdivideSettings.minSharpDihedralAngle ( )

30 degrees Returns a pointer to a member variable of class MR::SubdivideSettings named minSharpDihedralAngle. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_minSharpDihedralAngle().

◆ newVerts()

java.lang.foreign.MemorySegment meshlib.SubdivideSettings.newVerts ( )

New vertices appeared during subdivision will be added here Returns a pointer to a member variable of class MR::SubdivideSettings named newVerts. The reference to this object might be preserved as the return value.

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

◆ notFlippable()

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

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

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

◆ onEdgeSplit()

meshlib.std_function_void_from_MR_EdgeId_MR_EdgeId meshlib.SubdivideSettings.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::SubdivideSettings named onEdgeSplit. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_onEdgeSplit().

◆ onlyNearNotFlippable()

boolean meshlib.SubdivideSettings.onlyNearNotFlippable ( )

If true, then only the edges having a vertex of their left or right triangle incident to a notFlippable edge can be split, so subdivision is localized near notFlippable edges; notFlippable must not be null then (nothing is split in release otherwise) Returns a pointer to a member variable of class MR::SubdivideSettings named onlyNearNotFlippable. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_onlyNearNotFlippable().

◆ onVertCreated()

meshlib.std_function_void_from_MR_VertId meshlib.SubdivideSettings.onVertCreated ( )

this function is called each time a new vertex has been created, but before the ring is made Delone Returns a pointer to a member variable of class MR::SubdivideSettings named onVertCreated. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_onVertCreated().

◆ progressCallback()

meshlib.std_function_bool_from_float meshlib.SubdivideSettings.progressCallback ( )

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

Calls MR_SubdivideSettings_Get_progressCallback().

◆ projectOnOriginalMesh()

boolean meshlib.SubdivideSettings.projectOnOriginalMesh ( )

if true, then every new vertex will be projected on the original mesh (before smoothing) Returns a pointer to a member variable of class MR::SubdivideSettings named projectOnOriginalMesh. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_projectOnOriginalMesh().

◆ region()

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

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

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

◆ setBeforeEdgeSplit()

void meshlib.SubdivideSettings.setBeforeEdgeSplit ( meshlib.std_function_bool_from_MR_EdgeId value)

this function is called each time edge (e) is going to split, if it returns false then this split will be skipped Modifies a member variable of class MR::SubdivideSettings named beforeEdgeSplit. The reference to the parameter value might be preserved in this object in element beforeEdgeSplit.

Calls MR_SubdivideSettings_Set_beforeEdgeSplit().

◆ setCriticalAspectRatioFlip()

void meshlib.SubdivideSettings.setCriticalAspectRatioFlip ( float value)

If this value is less than FLT_MAX then edge flips will ignore dihedral angle check if one of triangles has aspect ratio more than this value Unit: rad Modifies a member variable of class MR::SubdivideSettings named criticalAspectRatioFlip.

Calls MR_SubdivideSettings_Set_criticalAspectRatioFlip().

◆ setCurvaturePriority()

void meshlib.SubdivideSettings.setCurvaturePriority ( float value)

edge length will be magnified by the squared difference of normals at edge's ends times this factor, thus subdivision will be finer in the regions of high curvature compared to planar regions Modifies a member variable of class MR::SubdivideSettings named curvaturePriority.

Calls MR_SubdivideSettings_Set_curvaturePriority().

◆ setMaintainRegion()

void meshlib.SubdivideSettings.setMaintainRegion ( meshlib.FaceBitSet value)

Additional region to update during subdivision: if a face from here is split, it is replaced with new sub-faces; note that Subdivide can split faces even outside of main region, so it might be necessary to update another region Modifies a member variable of class MR::SubdivideSettings named maintainRegion. The reference to the parameter value might be preserved in this object in element maintainRegion.

Calls MR_SubdivideSettings_Set_maintainRegion().

◆ setMaxAngleChangeAfterFlip()

void meshlib.SubdivideSettings.setMaxAngleChangeAfterFlip ( float value)

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

Calls MR_SubdivideSettings_Set_maxAngleChangeAfterFlip().

◆ setMaxDeviationAfterFlip()

void meshlib.SubdivideSettings.setMaxDeviationAfterFlip ( float value)

Improves local mesh triangulation by doing edge flips if it does not make too big surface deviation Modifies a member variable of class MR::SubdivideSettings named maxDeviationAfterFlip.

Calls MR_SubdivideSettings_Set_maxDeviationAfterFlip().

◆ setMaxEdgeLen()

void meshlib.SubdivideSettings.setMaxEdgeLen ( float value)

Subdivision is stopped when all edges inside or on the boundary of the region are not longer than this value Modifies a member variable of class MR::SubdivideSettings named maxEdgeLen.

Calls MR_SubdivideSettings_Set_maxEdgeLen().

◆ setMaxEdgeSplits()

void meshlib.SubdivideSettings.setMaxEdgeSplits ( int value)

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

Calls MR_SubdivideSettings_Set_maxEdgeSplits().

◆ setMaxSplittableTriAspectRatio()

void meshlib.SubdivideSettings.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 subdivideBorder==false, otherwise many narrow triangles can appear near border Modifies a member variable of class MR::SubdivideSettings named maxSplittableTriAspectRatio.

Calls MR_SubdivideSettings_Set_maxSplittableTriAspectRatio().

◆ setMaxTriAspectRatio()

void meshlib.SubdivideSettings.setMaxTriAspectRatio ( float value)

The subdivision stops as soon as all triangles (in the region) have aspect ratio below or equal to this value Modifies a member variable of class MR::SubdivideSettings named maxTriAspectRatio.

Calls MR_SubdivideSettings_Set_maxTriAspectRatio().

◆ setMinSharpDihedralAngle()

void meshlib.SubdivideSettings.setMinSharpDihedralAngle ( float value)

30 degrees Modifies a member variable of class MR::SubdivideSettings named minSharpDihedralAngle.

Calls MR_SubdivideSettings_Set_minSharpDihedralAngle().

◆ setNewVerts()

void meshlib.SubdivideSettings.setNewVerts ( meshlib.VertBitSet value)

New vertices appeared during subdivision will be added here Modifies a member variable of class MR::SubdivideSettings named newVerts. The reference to the parameter value might be preserved in this object in element newVerts.

Calls MR_SubdivideSettings_Set_newVerts().

◆ setNotFlippable()

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

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

Calls MR_SubdivideSettings_Set_notFlippable().

◆ setOnEdgeSplit()

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

Calls MR_SubdivideSettings_Set_onEdgeSplit().

◆ setOnlyNearNotFlippable()

void meshlib.SubdivideSettings.setOnlyNearNotFlippable ( boolean value)

If true, then only the edges having a vertex of their left or right triangle incident to a notFlippable edge can be split, so subdivision is localized near notFlippable edges; notFlippable must not be null then (nothing is split in release otherwise) Modifies a member variable of class MR::SubdivideSettings named onlyNearNotFlippable.

Calls MR_SubdivideSettings_Set_onlyNearNotFlippable().

◆ setOnVertCreated()

void meshlib.SubdivideSettings.setOnVertCreated ( meshlib.std_function_void_from_MR_VertId value)

this function is called each time a new vertex has been created, but before the ring is made Delone Modifies a member variable of class MR::SubdivideSettings named onVertCreated. The reference to the parameter value might be preserved in this object in element onVertCreated.

Calls MR_SubdivideSettings_Set_onVertCreated().

◆ setProgressCallback()

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

Calls MR_SubdivideSettings_Set_progressCallback().

◆ setProjectOnOriginalMesh()

void meshlib.SubdivideSettings.setProjectOnOriginalMesh ( boolean value)

if true, then every new vertex will be projected on the original mesh (before smoothing) Modifies a member variable of class MR::SubdivideSettings named projectOnOriginalMesh.

Calls MR_SubdivideSettings_Set_projectOnOriginalMesh().

◆ setRegion()

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

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

Calls MR_SubdivideSettings_Set_region().

◆ setSmoothMode()

void meshlib.SubdivideSettings.setSmoothMode ( boolean value)

Puts new vertices so that they form a smooth surface together with existing vertices. This option works best for natural surfaces without sharp edges in between triangles Modifies a member variable of class MR::SubdivideSettings named smoothMode.

Calls MR_SubdivideSettings_Set_smoothMode().

◆ setSubdivideBorder()

void meshlib.SubdivideSettings.setSubdivideBorder ( boolean value)

If false do not touch border edges (cannot subdivide lone faces)
use MR::findRegionOuterFaces to find boundary faces Modifies a member variable of class MR::SubdivideSettings named subdivideBorder.

Calls MR_SubdivideSettings_Set_subdivideBorder().

◆ smoothMode()

boolean meshlib.SubdivideSettings.smoothMode ( )

Puts new vertices so that they form a smooth surface together with existing vertices. This option works best for natural surfaces without sharp edges in between triangles Returns a pointer to a member variable of class MR::SubdivideSettings named smoothMode. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_smoothMode().

◆ subdivideBorder()

boolean meshlib.SubdivideSettings.subdivideBorder ( )

If false do not touch border edges (cannot subdivide lone faces)
use MR::findRegionOuterFaces to find boundary faces Returns a pointer to a member variable of class MR::SubdivideSettings named subdivideBorder. The reference to this object might be preserved as the return value.

Calls MR_SubdivideSettings_Get_subdivideBorder().


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