MeshLib C Docs
Loading...
Searching...
No Matches
MRSubfeatures.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 <stdbool.h>
7#include <stddef.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
14typedef struct MR_std_function_void_from_const_MR_Features_SubfeatureInfo_ref MR_std_function_void_from_const_MR_Features_SubfeatureInfo_ref; // Defined in `#include <MRCMisc/std_function_void_from_const_MR_Features_SubfeatureInfo_ref.h>`.
15typedef struct MR_std_string_view MR_std_string_view; // Defined in `#include <MRCMisc/std_string_view.h>`.
16typedef struct MR_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane MR_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane; // Defined in `#include <MRCMisc/std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane.h>`.
17
18
19// Describes a single feature produced by `forEachSubfeature()`.
22
23// A user-friendly name.
28
29// A user-friendly name.
34MRC_API void MR_Features_SubfeatureInfo_Set_name(MR_Features_SubfeatureInfo *_this, const char *value, const char *value_end);
35
36// A user-friendly name.
41
42// Whether the feature has infinite length.
47
48// Whether the feature has infinite length.
52
53// Whether the feature has infinite length.
58
59// Call this to create this subfeature.
60// Pass the same feature you passed to `forEachSubfeature()`, or a DIFFERENT one to create the same kind of subfeature relative to that.
65
66// Call this to create this subfeature.
67// Pass the same feature you passed to `forEachSubfeature()`, or a DIFFERENT one to create the same kind of subfeature relative to that.
71
72// Call this to create this subfeature.
73// Pass the same feature you passed to `forEachSubfeature()`, or a DIFFERENT one to create the same kind of subfeature relative to that.
78
82
87
93
96
99
103
106
109
114
115// Decomposes a feature to its subfeatures, by calling `func()` on each subfeature.
116// This only returns the direct subfeatures. You can call this recursively to obtain all features,
117// but beware of duplicates (there's no easy way to filter them).
122
123#ifdef __cplusplus
124} // extern "C"
125#endif
struct MR_std_string_view MR_std_string_view
Definition MRFeatureHelpers.h:15
struct MR_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane MR_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane
Definition MRFeatures.h:26
MRC_API MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_ConstructFrom(const char *name, const char *name_end, bool isInfinite, MR_PassBy create_pass_by, MR_std_function_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_from_const_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_ref *create)
MRC_API void MR_Features_forEachSubfeature(const MR_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane *feature, const MR_std_function_void_from_const_MR_Features_SubfeatureInfo_ref *func)
MRC_API void MR_Features_SubfeatureInfo_Set_name(MR_Features_SubfeatureInfo *_this, const char *value, const char *value_end)
struct MR_std_function_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_from_const_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_ref MR_std_function_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_from_const_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_ref
Definition MRSubfeatures.h:13
MRC_API void MR_Features_SubfeatureInfo_Destroy(const MR_Features_SubfeatureInfo *_this)
Destroys a heap-allocated instance of MR_Features_SubfeatureInfo. Does nothing if the pointer is null...
MRC_API MR_std_string_view * MR_Features_SubfeatureInfo_GetMutable_name(MR_Features_SubfeatureInfo *_this)
MRC_API MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_DefaultConstructArray(size_t num_elems)
MRC_API MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_OffsetMutablePtr(MR_Features_SubfeatureInfo *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 const MR_std_string_view * MR_Features_SubfeatureInfo_Get_name(const MR_Features_SubfeatureInfo *_this)
struct MR_std_function_void_from_const_MR_Features_SubfeatureInfo_ref MR_std_function_void_from_const_MR_Features_SubfeatureInfo_ref
Definition MRSubfeatures.h:14
MRC_API void MR_Features_SubfeatureInfo_DestroyArray(const MR_Features_SubfeatureInfo *_this)
Destroys a heap-allocated array of MR_Features_SubfeatureInfo. Does nothing if the pointer is null.
MRC_API const MR_std_function_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_from_const_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_ref * MR_Features_SubfeatureInfo_Get_create(const MR_Features_SubfeatureInfo *_this)
MRC_API MR_std_function_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_from_const_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_ref * MR_Features_SubfeatureInfo_GetMutable_create(MR_Features_SubfeatureInfo *_this)
struct MR_Features_SubfeatureInfo MR_Features_SubfeatureInfo
Generated from class MR::Features::SubfeatureInfo.
Definition MRSubfeatures.h:21
MRC_API MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_ConstructFromAnother(MR_PassBy _other_pass_by, MR_Features_SubfeatureInfo *_other)
MRC_API bool * MR_Features_SubfeatureInfo_GetMutable_isInfinite(MR_Features_SubfeatureInfo *_this)
MRC_API MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_DefaultConstruct(void)
MRC_API MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_AssignFromAnother(MR_Features_SubfeatureInfo *_this, MR_PassBy _other_pass_by, MR_Features_SubfeatureInfo *_other)
MRC_API void MR_Features_SubfeatureInfo_Set_create(MR_Features_SubfeatureInfo *_this, MR_PassBy value_pass_by, MR_std_function_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_from_const_std_variant_MR_Sphere3f_MR_Features_Primitives_ConeSegment_MR_Features_Primitives_Plane_ref *value)
MRC_API const bool * MR_Features_SubfeatureInfo_Get_isInfinite(const MR_Features_SubfeatureInfo *_this)
MRC_API void MR_Features_SubfeatureInfo_Set_isInfinite(MR_Features_SubfeatureInfo *_this, bool value)
MRC_API const MR_Features_SubfeatureInfo * MR_Features_SubfeatureInfo_OffsetPtr(const MR_Features_SubfeatureInfo *ptr, ptrdiff_t i)
Offsets a pointer to an array element by i positions (not bytes). Use only if you're certain that the...
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11
virtual std::string name() const override