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

Public Member Functions

 Laplacian (java.lang.foreign.MemorySegment ptr, boolean owned, java.lang.Object owner)
 Laplacian (meshlib.Laplacian _other)
 Laplacian (meshlib.Mesh mesh)
 Laplacian (meshlib.MeshTopology topology, meshlib.VertCoords points)
void init (meshlib.VertBitSet freeVerts, meshlib.EdgeWeights weights, meshlib.VertexMass vmass, meshlib.RememberShape rem)
void initFromPoints (meshlib.VertCoords points, meshlib.VertBitSet freeVerts, meshlib.EdgeWeights weights, meshlib.VertexMass vmass, meshlib.RememberShape rem)
void fixVertex (meshlib.VertId v, java.lang.Boolean smooth)
void fixVertex (meshlib.VertId v, meshlib.Vector3f fixedPos, java.lang.Boolean smooth)
void multVertexWeight (meshlib.VertId v, double factor)
void updateSolver ()
void applyToVector (meshlib.VertCoords points)
void apply ()
void applyToScalar (meshlib.VertScalars scalarField)
meshlib.VertBitSet region ()
meshlib.VertBitSet freeVerts ()
meshlib.VertBitSet firstLayerFixedVerts ()
meshlib.MeshTopology topology ()
meshlib.VertCoords points ()
void addAttractor (meshlib.Laplacian_Attractor a)
void removeAllAttractors ()
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

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.

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

Constructor & Destructor Documentation

◆ Laplacian() [1/4]

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

◆ Laplacian() [2/4]

meshlib.Laplacian.Laplacian ( meshlib.Laplacian _other)

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

Calls MR_Laplacian_ConstructFromAnother().

◆ Laplacian() [3/4]

meshlib.Laplacian.Laplacian ( meshlib.Mesh mesh)

Generated from constructor MR::Laplacian::Laplacian. The reference to the parameter mesh might be preserved in the constructed object.

Calls MR_Laplacian_Construct().

◆ Laplacian() [4/4]

meshlib.Laplacian.Laplacian ( meshlib.MeshTopology topology,
meshlib.VertCoords points )

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

Calls MR_Laplacian_Construct_topology().

Member Function Documentation

◆ addAttractor()

void meshlib.Laplacian.addAttractor ( meshlib.Laplacian_Attractor a)

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().

◆ applyToScalar()

void meshlib.Laplacian.applyToScalar ( meshlib.VertScalars scalarField)

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().

◆ applyToVector()

void meshlib.Laplacian.applyToVector ( meshlib.VertCoords points)

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().

◆ firstLayerFixedVerts()

meshlib.VertBitSet meshlib.Laplacian.firstLayerFixedVerts ( )

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

Calls MR_Laplacian_firstLayerFixedVerts().

◆ fixVertex() [1/2]

void meshlib.Laplacian.fixVertex ( meshlib.VertId v,
java.lang.Boolean smooth )

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().

◆ fixVertex() [2/2]

void meshlib.Laplacian.fixVertex ( meshlib.VertId v,
meshlib.Vector3f fixedPos,
java.lang.Boolean smooth )

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().

◆ freeVerts()

meshlib.VertBitSet meshlib.Laplacian.freeVerts ( )

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

Calls MR_Laplacian_freeVerts().

◆ init()

void meshlib.Laplacian.init ( meshlib.VertBitSet freeVerts,
meshlib.EdgeWeights weights,
meshlib.VertexMass vmass,
meshlib.RememberShape rem )

(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().

◆ initFromPoints()

void meshlib.Laplacian.initFromPoints ( meshlib.VertCoords points,
meshlib.VertBitSet freeVerts,
meshlib.EdgeWeights weights,
meshlib.VertexMass vmass,
meshlib.RememberShape rem )

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().

◆ multVertexWeight()

void meshlib.Laplacian.multVertexWeight ( meshlib.VertId v,
double factor )

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

Calls MR_Laplacian_multVertexWeight().

◆ points()

meshlib.VertCoords meshlib.Laplacian.points ( )

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

Calls MR_Laplacian_points().

◆ region()

meshlib.VertBitSet meshlib.Laplacian.region ( )

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

Calls MR_Laplacian_region().

◆ removeAllAttractors()

void meshlib.Laplacian.removeAllAttractors ( )

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

Calls MR_Laplacian_removeAllAttractors().

◆ topology()

meshlib.MeshTopology meshlib.Laplacian.topology ( )

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

Calls MR_Laplacian_topology().

◆ updateSolver()

void meshlib.Laplacian.updateSolver ( )

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 class was generated from the following file: