MeshLib C Docs
Loading...
Searching...
No Matches
MRAddNoise.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/common.h>
4#include <MRCMisc/exports.h>
5
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
13typedef struct MR_VertBitSet MR_VertBitSet; // Defined in `#include <MRCMesh/MRBitSet.h>`.
14typedef struct MR_VertCoords MR_VertCoords; // Defined in `#include <MRCMesh/MRVector.h>`.
15typedef struct MR_expected_void_std_string MR_expected_void_std_string; // Defined in `#include <MRCMisc/expected_void_std_string.h>`.
16typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
17
18
21
26
30
35
36// start state of the generator engine
40MRC_API const unsigned int *MR_NoiseSettings_Get_seed(const MR_NoiseSettings *_this);
41
42// start state of the generator engine
45MRC_API void MR_NoiseSettings_Set_seed(MR_NoiseSettings *_this, unsigned int value);
46
47// start state of the generator engine
52
57
61
66
70
75
78MRC_API MR_NoiseSettings *MR_NoiseSettings_ConstructFrom(float sigma, unsigned int seed, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback);
79
82
85
89
92
95
100
101// Adds noise to the points, using a normal distribution
107
115
116#ifdef __cplusplus
117} // extern "C"
118#endif
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_VertCoords MR_VertCoords
Definition MRAABBTreePoints.h:21
struct MR_VertBitSet MR_VertBitSet
Definition MRAABBTree.h:15
MRC_API MR_NoiseSettings * MR_NoiseSettings_DefaultConstruct(void)
MRC_API void MR_NoiseSettings_Destroy(const MR_NoiseSettings *_this)
Destroys a heap-allocated instance of MR_NoiseSettings. Does nothing if the pointer is null.
MRC_API void MR_NoiseSettings_Set_seed(MR_NoiseSettings *_this, unsigned int value)
MRC_API MR_NoiseSettings * MR_NoiseSettings_OffsetMutablePtr(MR_NoiseSettings *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_NoiseSettings * MR_NoiseSettings_ConstructFromAnother(MR_PassBy _other_pass_by, MR_NoiseSettings *_other)
MRC_API MR_NoiseSettings * MR_NoiseSettings_AssignFromAnother(MR_NoiseSettings *_this, MR_PassBy _other_pass_by, MR_NoiseSettings *_other)
MRC_API const unsigned int * MR_NoiseSettings_Get_seed(const MR_NoiseSettings *_this)
MRC_API MR_NoiseSettings * MR_NoiseSettings_ConstructFrom(float sigma, unsigned int seed, MR_PassBy callback_pass_by, MR_std_function_bool_from_float *callback)
MRC_API float * MR_NoiseSettings_GetMutable_sigma(MR_NoiseSettings *_this)
MRC_API void MR_NoiseSettings_Set_callback(MR_NoiseSettings *_this, MR_PassBy value_pass_by, MR_std_function_bool_from_float *value)
struct MR_NoiseSettings MR_NoiseSettings
Generated from class MR::NoiseSettings.
Definition MRAddNoise.h:20
MRC_API MR_NoiseSettings * MR_NoiseSettings_DefaultConstructArray(size_t num_elems)
MRC_API const MR_NoiseSettings * MR_NoiseSettings_OffsetPtr(const MR_NoiseSettings *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_std_function_bool_from_float * MR_NoiseSettings_GetMutable_callback(MR_NoiseSettings *_this)
MRC_API unsigned int * MR_NoiseSettings_GetMutable_seed(MR_NoiseSettings *_this)
MRC_API const MR_std_function_bool_from_float * MR_NoiseSettings_Get_callback(const MR_NoiseSettings *_this)
MRC_API void MR_NoiseSettings_Set_sigma(MR_NoiseSettings *_this, float value)
MRC_API MR_expected_void_std_string * MR_addNoise_MR_Mesh(MR_Mesh *mesh, const MR_VertBitSet *region, const MR_NoiseSettings *settings)
MRC_API const float * MR_NoiseSettings_Get_sigma(const MR_NoiseSettings *_this)
MRC_API MR_expected_void_std_string * MR_addNoise_MR_VertCoords(MR_VertCoords *points, const MR_VertBitSet *validVerts, MR_PassBy settings_pass_by, MR_NoiseSettings *settings)
MRC_API void MR_NoiseSettings_DestroyArray(const MR_NoiseSettings *_this)
Destroys a heap-allocated array of MR_NoiseSettings. Does nothing if the pointer is null.
struct MR_expected_void_std_string MR_expected_void_std_string
Definition MRCtm.h:19
struct MR_Mesh MR_Mesh
Definition MRCtm.h:12
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11