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#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
17typedef struct MR_MeshTopology MR_MeshTopology; // Defined in `#include <MRCMesh/MRMeshTopology.h>`.
18typedef struct MR_Vector3f MR_Vector3f; // Defined in `#include <MRCMesh/MRVector3.h>`.
19typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
20typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
21typedef struct MR_VertScalars MR_VertScalars; // Defined in `#include <MRCMesh/MRVector.h>`.
22
23
34
36enum // MR_Laplacian_RememberShape
37{
38 // true Laplacian mode when initial mesh shape is remembered and copied in apply
40 // ignore initial mesh shape in the region and just position vertices smoothly in the region
42};
43
47
50
53
58
64
67
70
78MRC_API void MR_Laplacian_init(MR_Laplacian *_this, const MR_VertBitSet *freeVerts, MR_EdgeWeights weights, const MR_VertexMass *vmass, const MR_Laplacian_RememberShape *rem);
79
85MRC_API void MR_Laplacian_fixVertex_2(MR_Laplacian *_this, MR_VertId v, const bool *smooth);
86
93MRC_API void MR_Laplacian_fixVertex_3(MR_Laplacian *_this, MR_VertId v, const MR_Vector3f *fixedPos, const bool *smooth);
94
99
104
110
116
122
128
129#ifdef __cplusplus
130} // extern "C"
131#endif
struct MR_MeshTopology MR_MeshTopology
Definition MR2DContoursTriangulation.h:16
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:22
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:13
int32_t MR_VertexMass
determines the weight or mass of each vertex in applications like Laplacian
Definition MREnums.h:14
int32_t MR_EdgeWeights
determines the weight of each edge in applications like Laplacian
Definition MREnums.h:24
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)
@ MR_Laplacian_RememberShape_Yes
Definition MRLaplacian.h:39
@ MR_Laplacian_RememberShape_No
Definition MRLaplacian.h:41
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)
int32_t MR_Laplacian_RememberShape
Definition MRLaplacian.h:35
struct MR_Laplacian MR_Laplacian
Definition MRLaplacian.h:33
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)
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:51
Definition MRId.h:56