MeshLib C Docs
Loading...
Searching...
No Matches
MRLaplacian.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MREnums.h>
4#include <MRCMesh/MRId.h>
5#include <MRCMisc/common.h>
6#include <MRCMisc/exports.h>
7
8#include <stdbool.h>
9#include <stddef.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
16typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
17typedef struct MR_Vector3f MR_Vector3f; // Defined in `#include <MRCMesh/MRVector3.h>`.
18typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
19typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
20typedef struct MR_VertScalars MR_VertScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
21
22
33
35{
36 // true Laplacian mode when initial mesh shape is remembered and copied in apply
38 // ignore initial mesh shape in the region and just position vertices smoothly in the region
41
45
48
51
56
62
65
68
76MRC_API void MR_Laplacian_init(MR_Laplacian *_this, const MR_VertBitSet *freeVerts, MR_EdgeWeights weights, const MR_VertexMass *vmass, const MR_Laplacian_RememberShape *rem);
77
83MRC_API void MR_Laplacian_fixVertex_2(MR_Laplacian *_this, MR_VertId v, const bool *smooth);
84
91MRC_API void MR_Laplacian_fixVertex_3(MR_Laplacian *_this, MR_VertId v, const MR_Vector3f *fixedPos, const bool *smooth);
92
97
102
108
114
120
126
127#ifdef __cplusplus
128} // extern "C"
129#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:15
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:21
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
struct MR_VertScalars MR_VertScalars
Definition MRAggregateFlow.h:17
struct MR_Mesh MR_Mesh
Definition MRCtm.h:12
MR_EdgeWeights
determines the weight of each edge in applications like Laplacian
Definition MREnums.h:23
MR_VertexMass
determines the weight or mass of each vertex in applications like Laplacian
Definition MREnums.h:14
MRC_API void MR_Laplacian_updateSolver(MR_Laplacian *_this)
MRC_API const MR_Laplacian * MR_Laplacian_OffsetPtr(const MR_Laplacian *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API void MR_Laplacian_init(MR_Laplacian *_this, const MR_VertBitSet *freeVerts, MR_EdgeWeights weights, const MR_VertexMass *vmass, const MR_Laplacian_RememberShape *rem)
MRC_API const MR_VertBitSet * MR_Laplacian_firstLayerFixedVerts(const MR_Laplacian *_this)
MRC_API MR_Laplacian * MR_Laplacian_Construct_2(const MR_MeshTopology *topology, MR_VertCoords *points)
MRC_API const MR_VertBitSet * MR_Laplacian_region(const MR_Laplacian *_this)
struct MR_Laplacian MR_Laplacian
Definition MRLaplacian.h:32
MRC_API MR_Laplacian * MR_Laplacian_OffsetMutablePtr(MR_Laplacian *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MRC_API MR_Laplacian * MR_Laplacian_Construct_1(MR_Mesh *mesh)
MRC_API const MR_VertBitSet * MR_Laplacian_freeVerts(const MR_Laplacian *_this)
MRC_API void MR_Laplacian_fixVertex_2(MR_Laplacian *_this, MR_VertId v, const bool *smooth)
MR_Laplacian_RememberShape
Definition MRLaplacian.h:35
@ MR_Laplacian_RememberShape_Yes
Definition MRLaplacian.h:37
@ MR_Laplacian_RememberShape_No
Definition MRLaplacian.h:39
MRC_API void MR_Laplacian_DestroyArray(const MR_Laplacian *_this)
Destroys a heap-allocated array of MR_Laplacian. Does nothing if the pointer is null.
MRC_API void MR_Laplacian_Destroy(const MR_Laplacian *_this)
Destroys a heap-allocated instance of MR_Laplacian. Does nothing if the pointer is null.
MRC_API void MR_Laplacian_apply(MR_Laplacian *_this)
MRC_API void MR_Laplacian_applyToScalar(MR_Laplacian *_this, MR_VertScalars *scalarField)
MRC_API void MR_Laplacian_fixVertex_3(MR_Laplacian *_this, MR_VertId v, const MR_Vector3f *fixedPos, const bool *smooth)
MRC_API MR_Laplacian * MR_Laplacian_ConstructFromAnother(MR_PassBy _other_pass_by, MR_Laplacian *_other)
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:50
Definition MRId.h:55