MeshLib C Docs
Loading...
Searching...
No Matches
MRFillingSurface.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMesh/MRVector3.h>
4#include <MRCMisc/common.h>
5#include <MRCMisc/exports.h>
6
7#include <stdbool.h>
8#include <stddef.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef struct MR_FunctionVolume MR_FunctionVolume; // Defined in `#include <MRCVoxels/MRVoxelsVolume.h>`.
15typedef struct MR_Mesh MR_Mesh; // Defined in `#include <MRCMesh/MRMesh.h>`.
16typedef struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string; // Defined in `#include <MRCMisc/expected_MR_Mesh_std_string.h>`.
17typedef struct MR_std_function_bool_from_float MR_std_function_bool_from_float; // Defined in `#include <MRCMisc/std_function_bool_from_float.h>`.
18typedef struct MR_std_optional_float MR_std_optional_float; // Defined in `#include <MRCMisc/std_optional_float.h>`.
19typedef struct MR_std_vector_std_string MR_std_vector_std_string; // Defined in `#include <MRCMisc/std_vector_std_string.h>`.
20
21
31
37
43
46
47// Different kinds of filling surface
53
58
63
67
68// Type of the surface
73
74// Type of the surface
78
79// Type of the surface
84
85// Frequency of oscillations (determines size of the "cells" in the "grid")
90
91// Frequency of oscillations (determines size of the "cells" in the "grid")
95
96// Frequency of oscillations (determines size of the "cells" in the "grid")
101
102// Ratio `n / T`, between the number of voxels and period of oscillations
107
108// Ratio `n / T`, between the number of voxels and period of oscillations
112
113// Ratio `n / T`, between the number of voxels and period of oscillations
118
122
127
131
134
137
142
146
151
154
157
163
168
172
177
182
186
191
195
200
203
206
210
213
218
221
224
230
239
247
255
259MRC_API MR_uint64_t MR_FillingSurface_TPMS_getNumberOfVoxels_MR_Mesh(const MR_Mesh *mesh, float frequency, float resolution);
260
265
271
277
281
287
292
298
304
309
315
321
326
332
333// used in tests in order to make surfaces close to their analytical expression
334// recommended to be false for real usage for better performance
339
340// used in tests in order to make surfaces close to their analytical expression
341// recommended to be false for real usage for better performance
345
346// used in tests in order to make surfaces close to their analytical expression
347// recommended to be false for real usage for better performance
352
356
361
365
368
371
376
379
382
388
397
406
409MRC_API float MR_FillingSurface_CellularSurface_estimateDensity(float period, float width, float r);
410
413// Due to the simplification of the formula (sphere must either fully contain the intersection of cylinders or be inside it), solution not always exists.
417
421
422#ifdef __cplusplus
423} // extern "C"
424#endif
struct MR_std_function_bool_from_float MR_std_function_bool_from_float
Definition MR3mf.h:10
struct MR_std_optional_float MR_std_optional_float
Definition MRBestFitPolynomial.h:14
struct MR_expected_MR_Mesh_std_string MR_expected_MR_Mesh_std_string
Definition MRCtm.h:17
struct MR_Mesh MR_Mesh
Definition MRCtm.h:12
MRC_API MR_std_vector_std_string * MR_FillingSurface_TPMS_getTypeNames(void)
MRC_API MR_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_DefaultConstruct(void)
MRC_API MR_std_vector_std_string * MR_FillingSurface_getKindNames(void)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_ConstructFrom(MR_FillingSurface_TPMS_Type type, float frequency, float resolution)
MRC_API MR_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_ConstructFrom(MR_Vector3f period, MR_Vector3f width, float r, bool highRes)
MRC_API void MR_FillingSurface_CellularSurface_Params_Set_period(MR_FillingSurface_CellularSurface_Params *_this, MR_Vector3f value)
MRC_API float MR_FillingSurface_TPMS_estimateIso(MR_FillingSurface_TPMS_Type type, float targetDensity)
MRC_API MR_FunctionVolume * MR_FillingSurface_TPMS_buildVolume(const MR_Vector3f *size, const MR_FillingSurface_TPMS_VolumeParams *params)
MRC_API MR_uint64_t MR_FillingSurface_TPMS_getNumberOfVoxels_MR_Vector3f(const MR_Vector3f *size, float frequency, float resolution)
struct MR_FillingSurface_TPMS_VolumeParams MR_FillingSurface_TPMS_VolumeParams
Definition MRFillingSurface.h:36
MRC_API const MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_MeshParams_OffsetPtr(const MR_FillingSurface_TPMS_MeshParams *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_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_DefaultConstructArray(size_t num_elems)
MRC_API void MR_FillingSurface_CellularSurface_Params_Destroy(const MR_FillingSurface_CellularSurface_Params *_this)
Destroys a heap-allocated instance of MR_FillingSurface_CellularSurface_Params. Does nothing if the p...
MRC_API const float * MR_FillingSurface_TPMS_VolumeParams_Get_frequency(const MR_FillingSurface_TPMS_VolumeParams *_this)
MRC_API const float * MR_FillingSurface_TPMS_VolumeParams_Get_resolution(const MR_FillingSurface_TPMS_VolumeParams *_this)
MRC_API void MR_FillingSurface_CellularSurface_Params_Set_width(MR_FillingSurface_CellularSurface_Params *_this, MR_Vector3f value)
MR_FillingSurface_Kind
Definition MRFillingSurface.h:49
@ MR_FillingSurface_Kind_TPMS
Definition MRFillingSurface.h:50
@ MR_FillingSurface_Kind_Cellular
Definition MRFillingSurface.h:51
MRC_API bool MR_FillingSurface_TPMS_isThick(MR_FillingSurface_TPMS_Type type)
MRC_API void MR_FillingSurface_TPMS_VolumeParams_Destroy(const MR_FillingSurface_TPMS_VolumeParams *_this)
Destroys a heap-allocated instance of MR_FillingSurface_TPMS_VolumeParams. Does nothing if the pointe...
MRC_API void MR_FillingSurface_CellularSurface_Params_DestroyArray(const MR_FillingSurface_CellularSurface_Params *_this)
Destroys a heap-allocated array of MR_FillingSurface_CellularSurface_Params. Does nothing if the poin...
MRC_API void MR_FillingSurface_TPMS_VolumeParams_Set_frequency(MR_FillingSurface_TPMS_VolumeParams *_this, float value)
MRC_API void MR_FillingSurface_TPMS_VolumeParams_DestroyArray(const MR_FillingSurface_TPMS_VolumeParams *_this)
Destroys a heap-allocated array of MR_FillingSurface_TPMS_VolumeParams. Does nothing if the pointer i...
MRC_API const MR_Vector3f * MR_FillingSurface_CellularSurface_Params_Get_width(const MR_FillingSurface_CellularSurface_Params *_this)
MRC_API MR_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_OffsetMutablePtr(MR_FillingSurface_CellularSurface_Params *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_expected_MR_Mesh_std_string * MR_FillingSurface_TPMS_build(const MR_Vector3f *size, const MR_FillingSurface_TPMS_MeshParams *params, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API const MR_FillingSurface_TPMS_Type * MR_FillingSurface_TPMS_VolumeParams_Get_type(const MR_FillingSurface_TPMS_VolumeParams *_this)
MRC_API MR_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_ConstructFromAnother(const MR_FillingSurface_CellularSurface_Params *_other)
MRC_API const float * MR_FillingSurface_TPMS_MeshParams_Get_iso(const MR_FillingSurface_TPMS_MeshParams *_this)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_AssignFromAnother(MR_FillingSurface_TPMS_VolumeParams *_this, const MR_FillingSurface_TPMS_VolumeParams *_other)
MRC_API bool * MR_FillingSurface_CellularSurface_Params_GetMutable_highRes(MR_FillingSurface_CellularSurface_Params *_this)
MRC_API const MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_MeshParams_UpcastTo_MR_FillingSurface_TPMS_VolumeParams(const MR_FillingSurface_TPMS_MeshParams *object)
MRC_API MR_expected_MR_Mesh_std_string * MR_FillingSurface_TPMS_fill(const MR_Mesh *mesh, const MR_FillingSurface_TPMS_MeshParams *params, MR_PassBy cb_pass_by, MR_std_function_bool_from_float *cb)
MRC_API MR_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_AssignFromAnother(MR_FillingSurface_CellularSurface_Params *_this, const MR_FillingSurface_CellularSurface_Params *_other)
MRC_API bool * MR_FillingSurface_TPMS_MeshParams_GetMutable_decimate(MR_FillingSurface_TPMS_MeshParams *_this)
MRC_API MR_expected_MR_Mesh_std_string * MR_FillingSurface_CellularSurface_build(const MR_Vector3f *size, const MR_FillingSurface_CellularSurface_Params *params, const MR_std_function_bool_from_float *cb)
MRC_API void MR_FillingSurface_TPMS_VolumeParams_Set_type(MR_FillingSurface_TPMS_VolumeParams *_this, MR_FillingSurface_TPMS_Type value)
MRC_API void MR_FillingSurface_CellularSurface_Params_Set_r(MR_FillingSurface_CellularSurface_Params *_this, float value)
MRC_API float MR_FillingSurface_TPMS_estimateDensity(MR_FillingSurface_TPMS_Type type, float targetIso)
MRC_API void MR_FillingSurface_CellularSurface_Params_Set_highRes(MR_FillingSurface_CellularSurface_Params *_this, bool value)
MRC_API MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_MeshParams_DefaultConstruct(void)
MRC_API float * MR_FillingSurface_CellularSurface_Params_GetMutable_r(MR_FillingSurface_CellularSurface_Params *_this)
MRC_API void MR_FillingSurface_TPMS_VolumeParams_Set_resolution(MR_FillingSurface_TPMS_VolumeParams *_this, float value)
MRC_API void MR_FillingSurface_TPMS_MeshParams_DestroyArray(const MR_FillingSurface_TPMS_MeshParams *_this)
Destroys a heap-allocated array of MR_FillingSurface_TPMS_MeshParams. Does nothing if the pointer is ...
MRC_API const bool * MR_FillingSurface_CellularSurface_Params_Get_highRes(const MR_FillingSurface_CellularSurface_Params *_this)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_DefaultConstructArray(size_t num_elems)
MRC_API MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_MeshParams_DefaultConstructArray(size_t num_elems)
MRC_API MR_std_vector_std_string * MR_FillingSurface_TPMS_getTypeTooltips(void)
MRC_API const bool * MR_FillingSurface_TPMS_MeshParams_Get_decimate(const MR_FillingSurface_TPMS_MeshParams *_this)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_MeshParams_MutableUpcastTo_MR_FillingSurface_TPMS_VolumeParams(MR_FillingSurface_TPMS_MeshParams *object)
Upcasts an instance of MR::FillingSurface::TPMS::MeshParams to its base class MR::FillingSurface::TPM...
MRC_API MR_Vector3f * MR_FillingSurface_CellularSurface_Params_GetMutable_period(MR_FillingSurface_CellularSurface_Params *_this)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_OffsetMutablePtr(MR_FillingSurface_TPMS_VolumeParams *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_expected_MR_Mesh_std_string * MR_FillingSurface_CellularSurface_fill(const MR_Mesh *mesh, const MR_FillingSurface_CellularSurface_Params *params, const MR_std_function_bool_from_float *cb)
MRC_API float * MR_FillingSurface_TPMS_VolumeParams_GetMutable_frequency(MR_FillingSurface_TPMS_VolumeParams *_this)
MRC_API MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_VolumeParams_MutableStaticDowncastTo_MR_FillingSurface_TPMS_MeshParams(MR_FillingSurface_TPMS_VolumeParams *object)
MRC_API const MR_Vector3f * MR_FillingSurface_CellularSurface_Params_Get_period(const MR_FillingSurface_CellularSurface_Params *_this)
MRC_API MR_FillingSurface_TPMS_Type * MR_FillingSurface_TPMS_VolumeParams_GetMutable_type(MR_FillingSurface_TPMS_VolumeParams *_this)
MRC_API MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_MeshParams_OffsetMutablePtr(MR_FillingSurface_TPMS_MeshParams *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_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_MeshParams_ConstructFromAnother(const MR_FillingSurface_TPMS_MeshParams *_other)
MRC_API const MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_OffsetPtr(const MR_FillingSurface_TPMS_VolumeParams *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_FillingSurface_TPMS_MeshParams MR_FillingSurface_TPMS_MeshParams
Definition MRFillingSurface.h:42
MRC_API void MR_FillingSurface_TPMS_MeshParams_Destroy(const MR_FillingSurface_TPMS_MeshParams *_this)
Destroys a heap-allocated instance of MR_FillingSurface_TPMS_MeshParams. Does nothing if the pointer ...
MRC_API MR_Vector3f * MR_FillingSurface_CellularSurface_Params_GetMutable_width(MR_FillingSurface_CellularSurface_Params *_this)
MRC_API MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_MeshParams_AssignFromAnother(MR_FillingSurface_TPMS_MeshParams *_this, const MR_FillingSurface_TPMS_MeshParams *_other)
MRC_API const float * MR_FillingSurface_CellularSurface_Params_Get_r(const MR_FillingSurface_CellularSurface_Params *_this)
MRC_API float MR_FillingSurface_TPMS_getMinimalResolution(MR_FillingSurface_TPMS_Type type, float iso)
MRC_API float * MR_FillingSurface_TPMS_VolumeParams_GetMutable_resolution(MR_FillingSurface_TPMS_VolumeParams *_this)
MRC_API void MR_FillingSurface_TPMS_MeshParams_Set_decimate(MR_FillingSurface_TPMS_MeshParams *_this, bool value)
MRC_API const MR_FillingSurface_CellularSurface_Params * MR_FillingSurface_CellularSurface_Params_OffsetPtr(const MR_FillingSurface_CellularSurface_Params *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
struct MR_FillingSurface_CellularSurface_Params MR_FillingSurface_CellularSurface_Params
Generated from class MR::FillingSurface::CellularSurface::Params.
Definition MRFillingSurface.h:45
MRC_API void MR_FillingSurface_TPMS_MeshParams_Set_iso(MR_FillingSurface_TPMS_MeshParams *_this, float value)
MR_FillingSurface_TPMS_Type
Supported types of TPMS (Triply Periodic Minimal Surfaces)
Definition MRFillingSurface.h:24
@ MR_FillingSurface_TPMS_Type_ThickGyroid
Definition MRFillingSurface.h:28
@ MR_FillingSurface_TPMS_Type_ThickSchwartzP
Definition MRFillingSurface.h:26
@ MR_FillingSurface_TPMS_Type_DoubleGyroid
Definition MRFillingSurface.h:27
@ MR_FillingSurface_TPMS_Type_SchwartzP
Definition MRFillingSurface.h:25
@ MR_FillingSurface_TPMS_Type_Count
Definition MRFillingSurface.h:29
MRC_API float MR_FillingSurface_CellularSurface_estimateDensity(float period, float width, float r)
MRC_API MR_std_optional_float * MR_FillingSurface_CellularSurface_estimateWidth(float period, float r, float targetDensity)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_DefaultConstruct(void)
MRC_API const MR_FillingSurface_TPMS_MeshParams * MR_FillingSurface_TPMS_VolumeParams_StaticDowncastTo_MR_FillingSurface_TPMS_MeshParams(const MR_FillingSurface_TPMS_VolumeParams *object)
MRC_API float * MR_FillingSurface_TPMS_MeshParams_GetMutable_iso(MR_FillingSurface_TPMS_MeshParams *_this)
MRC_API MR_uint64_t MR_FillingSurface_TPMS_getNumberOfVoxels_MR_Mesh(const MR_Mesh *mesh, float frequency, float resolution)
MRC_API MR_FillingSurface_TPMS_VolumeParams * MR_FillingSurface_TPMS_VolumeParams_ConstructFromAnother(const MR_FillingSurface_TPMS_VolumeParams *_other)
struct MR_std_vector_std_string MR_std_vector_std_string
Definition MRPdf.h:29
MR_PassBy
Definition common.h:19
uint64_t MR_uint64_t
Definition common.h:14
struct MR_FunctionVolume MR_FunctionVolume
Definition expected_MR_FunctionVolume_std_string.h:12
#define MRC_API
Definition exports.h:11
size_t size() const
Definition MRVector3.h:50