#include <MRMesh/MRLaplacian.h>
Classes | |
| struct | Attractor |
| attracts the given point inside some mesh's triangle to the given target with the given weight More... | |
Public Member Functions | |
| Laplacian (Mesh &mesh) | |
| Laplacian (const MeshTopology &topology, VertCoords &points) | |
| Laplacian (Laplacian &&) noexcept | |
| ~Laplacian () | |
| void | init (const VertBitSet &freeVerts, EdgeWeights weights, VertexMass vmass=VertexMass::Unit, RememberShape rem=RememberShape::Yes) |
| void | initFromPoints (const VertCoords &points, const VertBitSet &freeVerts, EdgeWeights weights, VertexMass vmass=VertexMass::Unit, RememberShape rem=RememberShape::Yes) |
| same as init() but uses the given points instead of ones passed to a constructor for weights computation and shape memory | |
| void | fixVertex (VertId v, bool smooth=true) |
| void | fixVertex (VertId v, const Vector3f &fixedPos, bool smooth=true) |
| void | multVertexWeight (VertId v, double factor) |
| multiplies vertex equation's weight on the given factor | |
| void | updateSolver () |
| if you manually call this method after initialization and fixing vertices then next apply call will be much faster | |
| void | applyToVector (VertCoords &points) |
| void | apply () |
| void | applyToScalar (VertScalars &scalarField) |
| const VertBitSet & | region () const |
| return all initially free vertices and the first layer of vertices around them | |
| const VertBitSet & | freeVerts () const |
| return currently free vertices | |
| const VertBitSet & | firstLayerFixedVerts () const |
| return fixed vertices from the first layer around free vertices | |
| const MeshTopology & | topology () const |
| return the topology for which Laplacian was constructed | |
| VertCoords & | points () const |
| return the vector of coordinates for which Laplacian was constructed | |
| void | addAttractor (const Attractor &a) |
| adds one more attractor to the stored list | |
| void | removeAllAttractors () |
| forgets all attractors added previously | |
Laplacian to smoothly deform a region preserving mesh fine details. How to use: