Classes | |
class | EdgeWeights |
class | RememberShape |
Public Member Functions | |
None | __init__ (self, Mesh mesh) |
None | apply (self) |
None | applyToScalar (self, VertScalars scalarField) |
VertBitSet | firstLayerFixedVerts (self) |
None | fixVertex (self, VertId v, bool smooth=True) |
None | fixVertex (self, VertId v, Vector3f fixedPos, bool smooth=True) |
VertBitSet | freeVerts (self) |
None | init (self, VertBitSet freeVerts, EdgeWeights weights, Laplacian.RememberShape rem='Laplacian::RememberShape::Yes') |
VertBitSet | region (self) |
None | updateSolver (self) |
Generated from: MR::Laplacian Laplacian to smoothly deform a region preserving mesh fine details. How to use: 1. Initialize Laplacian for the region being deformed, here region properties are remembered. 2. Change positions of some vertices within the region and call fixVertex for them. 3. Optionally call updateSolver() 4. Call apply() to change the remaining vertices within the region Then steps 1-4 or 2-4 can be repeated.
None meshlib.mrmeshpy.Laplacian.__init__ | ( | self, | |
Mesh | mesh ) |
None meshlib.mrmeshpy.Laplacian.apply | ( | self | ) |
given fixed vertices, computes positions of remaining region vertices
None meshlib.mrmeshpy.Laplacian.applyToScalar | ( | self, | |
VertScalars | scalarField ) |
given a pre-resized scalar field with set values in fixed vertices, computes the values in free vertices
VertBitSet meshlib.mrmeshpy.Laplacian.firstLayerFixedVerts | ( | self | ) |
return fixed vertices from the first layer around free vertices
None meshlib.mrmeshpy.Laplacian.fixVertex | ( | self, | |
VertId | v, | ||
bool | smooth = True ) |
notify Laplacian that given vertex has changed after init and must be fixed during apply; \\param smooth whether to make the surface smooth in this vertex (sharp otherwise)
sets position of given vertex after init and it must be fixed during apply (THIS METHOD CHANGES THE MESH); \\param smooth whether to make the surface smooth in this vertex (sharp otherwise)
VertBitSet meshlib.mrmeshpy.Laplacian.freeVerts | ( | self | ) |
return currently free vertices
None meshlib.mrmeshpy.Laplacian.init | ( | self, | |
VertBitSet | freeVerts, | ||
EdgeWeights | weights, | ||
Laplacian.RememberShape | rem = 'Laplacian::RememberShape::Yes' ) |
initialize Laplacian for the region being deformed, here region properties are remembered and precomputed; \\param freeVerts must not include all vertices of a mesh connected component
VertBitSet meshlib.mrmeshpy.Laplacian.region | ( | self | ) |
return all initially free vertices and the first layer of vertices around them
None meshlib.mrmeshpy.Laplacian.updateSolver | ( | self | ) |
if you manually call this method after initialization and fixing vertices then next apply call will be much faster