#include <MRCMesh/MREnums.h>
#include <MRCMesh/MRId.h>
#include <MRCMisc/common.h>
#include <MRCMisc/exports.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
|
MRC_API MR_Laplacian * | MR_Laplacian_ConstructFromAnother (MR_PassBy _other_pass_by, MR_Laplacian *_other) |
|
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 pointer points to an array element.
|
|
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 pointer points to an array element.
|
|
MRC_API MR_Laplacian * | MR_Laplacian_Construct_1 (MR_Mesh *mesh) |
|
MRC_API MR_Laplacian * | MR_Laplacian_Construct_2 (const MR_MeshTopology *topology, MR_VertCoords *points) |
|
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_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_init (MR_Laplacian *_this, const MR_VertBitSet *freeVerts, MR_EdgeWeights weights, const MR_VertexMass *vmass, const MR_Laplacian_RememberShape *rem) |
|
MRC_API void | MR_Laplacian_fixVertex_2 (MR_Laplacian *_this, MR_VertId v, const bool *smooth) |
|
MRC_API void | MR_Laplacian_fixVertex_3 (MR_Laplacian *_this, MR_VertId v, const MR_Vector3f *fixedPos, const bool *smooth) |
|
MRC_API void | MR_Laplacian_updateSolver (MR_Laplacian *_this) |
|
MRC_API void | MR_Laplacian_apply (MR_Laplacian *_this) |
|
MRC_API void | MR_Laplacian_applyToScalar (MR_Laplacian *_this, MR_VertScalars *scalarField) |
|
MRC_API const MR_VertBitSet * | MR_Laplacian_region (const MR_Laplacian *_this) |
|
MRC_API const MR_VertBitSet * | MR_Laplacian_freeVerts (const MR_Laplacian *_this) |
|
MRC_API const MR_VertBitSet * | MR_Laplacian_firstLayerFixedVerts (const MR_Laplacian *_this) |
|
◆ MR_Laplacian
Laplacian to smoothly deform a region preserving mesh fine details. How to use:
- Initialize Laplacian for the region being deformed, here region properties are remembered.
- Change positions of some vertices within the region and call fixVertex for them.
- Optionally call updateSolver()
- 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
.
◆ MR_Laplacian_RememberShape
◆ MR_Mesh
◆ MR_MeshTopology
◆ MR_Vector3f
typedef struct MR_Vector3f MR_Vector3f |
◆ MR_VertBitSet
◆ MR_VertCoords
◆ MR_VertScalars
◆ anonymous enum
Enumerator |
---|
MR_Laplacian_RememberShape_Yes | |
MR_Laplacian_RememberShape_No | |
◆ MR_Laplacian_apply()
given fixed vertices, computes positions of remaining region vertices Generated from a method of class MR::Laplacian
named apply
. Parameter _this
can not be null. It is a single object.
◆ MR_Laplacian_applyToScalar()
given a pre-resized scalar field with set values in fixed vertices, computes the values in free vertices Generated from a method of class MR::Laplacian
named applyToScalar
. Parameter _this
can not be null. It is a single object. Parameter scalarField
can not be null. It is a single object.
◆ MR_Laplacian_Construct_1()
Generated from a constructor of class MR::Laplacian
. Parameter mesh
can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_Laplacian_Destroy()
to free it when you're done using it.
◆ MR_Laplacian_Construct_2()
Generated from a constructor of class MR::Laplacian
. Parameter topology
can not be null. It is a single object. Parameter points
can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_Laplacian_Destroy()
to free it when you're done using it.
◆ MR_Laplacian_ConstructFromAnother()
Generated from a constructor of class MR::Laplacian
. Never returns null. Returns an instance allocated on the heap! Must call MR_Laplacian_Destroy()
to free it when you're done using it.
◆ MR_Laplacian_Destroy()
Destroys a heap-allocated instance of MR_Laplacian
. Does nothing if the pointer is null.
◆ MR_Laplacian_DestroyArray()
Destroys a heap-allocated array of MR_Laplacian
. Does nothing if the pointer is null.
◆ MR_Laplacian_firstLayerFixedVerts()
return fixed vertices from the first layer around free vertices Generated from a method of class MR::Laplacian
named firstLayerFixedVerts
. Parameter _this
can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
◆ MR_Laplacian_fixVertex_2()
notify Laplacian that given vertex has changed after init and must be fixed during apply;
- Parameters
-
smooth | whether to make the surface smooth in this vertex (sharp otherwise) Generated from a method of class MR::Laplacian named fixVertex . Parameter _this can not be null. It is a single object. Parameter smooth has a default argument: true , pass a null pointer to use it. |
◆ MR_Laplacian_fixVertex_3()
sets position of given vertex after init and it must be fixed during apply (THIS METHOD CHANGES THE MESH);
- Parameters
-
smooth | whether to make the surface smooth in this vertex (sharp otherwise) Generated from a method of class MR::Laplacian named fixVertex . Parameter _this can not be null. It is a single object. Parameter fixedPos can not be null. It is a single object. Parameter smooth has a default argument: true , pass a null pointer to use it. |
◆ MR_Laplacian_freeVerts()
return currently free vertices Generated from a method of class MR::Laplacian
named freeVerts
. Parameter _this
can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
◆ MR_Laplacian_init()
initialize Laplacian for the region being deformed, here region properties are remembered and precomputed;
- Parameters
-
freeVerts | must not include all vertices of a mesh connected component Generated from a method of class MR::Laplacian named init . Parameter _this can not be null. It is a single object. Parameter freeVerts can not be null. It is a single object. Parameter vmass has a default argument: VertexMass::Unit , pass a null pointer to use it. Parameter rem has a default argument: Laplacian::RememberShape::Yes , pass a null pointer to use it. |
◆ MR_Laplacian_OffsetMutablePtr()
Offsets a pointer to an array element by i
positions (not bytes). Use only if you're certain that the pointer points to an array element.
◆ MR_Laplacian_OffsetPtr()
Offsets a pointer to an array element by i
positions (not bytes). Use only if you're certain that the pointer points to an array element.
◆ MR_Laplacian_region()
return all initially free vertices and the first layer of vertices around them Generated from a method of class MR::Laplacian
named region
. Parameter _this
can not be null. It is a single object. The returned pointer will never be null. It is non-owning, do NOT destroy it.
◆ MR_Laplacian_updateSolver()
if you manually call this method after initialization and fixing vertices then next apply call will be much faster Generated from a method of class MR::Laplacian
named updateSolver
. Parameter _this
can not be null. It is a single object.