MeshLib Rust Docs
Loading...
Searching...
No Matches
Inheritance diagram for meshlib::Laplacian:

Public Member Functions

void init (freeVerts:&meshlib::VertBitSet, weights:meshlib::EdgeWeights, vmass:Option< meshlib::VertexMass >, rem:Option< meshlib::RememberShape >)
void init_from_points (points:&meshlib::VertCoords, freeVerts:&meshlib::VertBitSet, weights:meshlib::EdgeWeights, vmass:Option< meshlib::VertexMass >, rem:Option< meshlib::RememberShape >)
void fix_vertex (v:meshlib::VertId, smooth:Option< bool >)
void fix_vertex_pos (v:meshlib::VertId, fixedPos:&meshlib::Vector3f, smooth:Option< bool >)
void mult_vertex_weight (v:meshlib::VertId, factor:f64)
void update_solver ()
void apply_to_vector (points:&mut meshlib::VertCoords)
void apply ()
void apply_to_scalar (scalarField:&mut meshlib::VertScalars)
auto region () const -> &meshlib::VertBitSet
auto free_verts () const -> &meshlib::VertBitSet
auto first_layer_fixed_verts () const -> &meshlib::VertBitSet
auto topology () const -> &meshlib::MeshTopology
auto points () const -> &mut meshlib::VertCoords
void add_attractor (a:&meshlib::Laplacian_Attractor)
void remove_all_attractors ()

Static Public Member Functions

static auto construct_from_another (_other:meshlib::Owned< meshlib::Laplacian >) -> meshlib::Owned< meshlib::Laplacian >
static auto construct (mesh:&mut meshlib::Mesh) -> meshlib::Owned< meshlib::Laplacian >
static auto construct_topology (topology:&meshlib::MeshTopology, points:&mut meshlib::VertCoords) -> meshlib::Owned< meshlib::Laplacian >
Static Public Member Functions inherited from meshlib::CppClass
static void destroy (ptr:*mut Self)

Detailed Description

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.
    Generated from class MR::Laplacian.

Generated from class MR::Laplacian. Heap-allocated instances are held in Owned<Laplacian>.

Member Function Documentation

◆ add_attractor()

void meshlib::Laplacian::add_attractor ( a:&meshlib::Laplacian_Attractor )

adds one more attractor to the stored list Generated from method MR::Laplacian::addAttractor.

Calls MR_Laplacian_addAttractor().

◆ apply()

void meshlib::Laplacian::apply ( )

takes fixed vertex positions from the points vector passed to a constructor, computes and writes free vertex positions in the points vector passed to a constructor as well Generated from method MR::Laplacian::apply.

Calls MR_Laplacian_apply().

◆ apply_to_scalar()

void meshlib::Laplacian::apply_to_scalar ( scalarField:&mut meshlib::VertScalars )

takes fixed vertex scalars from the given field, computes and writes free vertex scalars in the given field as well Generated from method MR::Laplacian::applyToScalar.

Calls MR_Laplacian_applyToScalar().

◆ apply_to_vector()

void meshlib::Laplacian::apply_to_vector ( points:&mut meshlib::VertCoords )

takes fixed vertex positions from the given points vector, computes and writes free vertex positions in the given points vector as well Generated from method MR::Laplacian::applyToVector.

Calls MR_Laplacian_applyToVector().

◆ construct()

auto meshlib::Laplacian::construct ( mesh:&mut meshlib::Mesh ) -> meshlib::Owned< meshlib::Laplacian >
static

Generated from constructor MR::Laplacian::Laplacian.

Calls MR_Laplacian_Construct(). The reference to the parameter mesh might be preserved in the constructed object.

◆ construct_from_another()

auto meshlib::Laplacian::construct_from_another ( _other:meshlib::Owned< meshlib::Laplacian > ) -> meshlib::Owned< meshlib::Laplacian >
static

Generated from constructor MR::Laplacian::Laplacian.

Calls MR_Laplacian_ConstructFromAnother(). The reference to things referred to by the parameter _other (if any) might be preserved in the constructed object.

◆ construct_topology()

auto meshlib::Laplacian::construct_topology ( topology:&meshlib::MeshTopology ,
points:&mut meshlib::VertCoords  ) -> meshlib::Owned< meshlib::Laplacian >
static

Generated from constructor MR::Laplacian::Laplacian.

Calls MR_Laplacian_Construct_topology(). The reference to the parameter topology might be preserved in the constructed object. The reference to the parameter points might be preserved in the constructed object.

◆ first_layer_fixed_verts()

auto meshlib::Laplacian::first_layer_fixed_verts ( ) const -> &meshlib::VertBitSet

return fixed vertices from the first layer around free vertices Generated from method MR::Laplacian::firstLayerFixedVerts.

Calls MR_Laplacian_firstLayerFixedVerts().

◆ fix_vertex()

void meshlib::Laplacian::fix_vertex ( v:meshlib::VertId ,
smooth:Option< bool >  )

notify Laplacian that given vertex has changed after init and must be fixed during apply;

Parameters
smoothwhether to make the surface smooth in this vertex (sharp otherwise) Generated from method MR::Laplacian::fixVertex.

Calls MR_Laplacian_fixVertex().

◆ fix_vertex_pos()

void meshlib::Laplacian::fix_vertex_pos ( v:meshlib::VertId ,
fixedPos:&meshlib::Vector3f ,
smooth:Option< bool >  )

sets position of given vertex after init and it must be fixed during apply (THIS METHOD CHANGES THE MESH);

Parameters
smoothwhether to make the surface smooth in this vertex (sharp otherwise) Generated from method MR::Laplacian::fixVertex.

Calls MR_Laplacian_fixVertex_pos().

◆ free_verts()

auto meshlib::Laplacian::free_verts ( ) const -> &meshlib::VertBitSet

return currently free vertices Generated from method MR::Laplacian::freeVerts.

Calls MR_Laplacian_freeVerts().

◆ init()

void meshlib::Laplacian::init ( freeVerts:&meshlib::VertBitSet ,
weights:meshlib::EdgeWeights ,
vmass:Option< meshlib::VertexMass > ,
rem:Option< meshlib::RememberShape >  )

(re)initialize Laplacian for the region being deformed, here region properties are remembered and precomputed;

Parameters
freeVertsmust not include all vertices of a mesh connected component; Generated from method MR::Laplacian::init.

Calls MR_Laplacian_init().

◆ init_from_points()

void meshlib::Laplacian::init_from_points ( points:&meshlib::VertCoords ,
freeVerts:&meshlib::VertBitSet ,
weights:meshlib::EdgeWeights ,
vmass:Option< meshlib::VertexMass > ,
rem:Option< meshlib::RememberShape >  )

same as init() but uses the given points instead of ones passed to a constructor for weights computation and shape memory Generated from method MR::Laplacian::initFromPoints.

Calls MR_Laplacian_initFromPoints().

◆ mult_vertex_weight()

void meshlib::Laplacian::mult_vertex_weight ( v:meshlib::VertId ,
factor:f64  )

multiplies vertex equation's weight on the given factor Generated from method MR::Laplacian::multVertexWeight.

Calls MR_Laplacian_multVertexWeight().

◆ points()

auto meshlib::Laplacian::points ( ) const -> &mut meshlib::VertCoords

return the vector of coordinates for which Laplacian was constructed Generated from method MR::Laplacian::points.

Calls MR_Laplacian_points().

◆ region()

auto meshlib::Laplacian::region ( ) const -> &meshlib::VertBitSet

return all initially free vertices and the first layer of vertices around them Generated from method MR::Laplacian::region.

Calls MR_Laplacian_region().

◆ remove_all_attractors()

void meshlib::Laplacian::remove_all_attractors ( )

forgets all attractors added previously Generated from method MR::Laplacian::removeAllAttractors.

Calls MR_Laplacian_removeAllAttractors().

◆ topology()

auto meshlib::Laplacian::topology ( ) const -> &meshlib::MeshTopology

return the topology for which Laplacian was constructed Generated from method MR::Laplacian::topology.

Calls MR_Laplacian_topology().

◆ update_solver()

void meshlib::Laplacian::update_solver ( )

if you manually call this method after initialization and fixing vertices then next apply call will be much faster Generated from method MR::Laplacian::updateSolver.

Calls MR_Laplacian_updateSolver().


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