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()`.
23
24// A user-friendly name.
29
30// A user-friendly name.
37MRC_API void MR_Features_SubfeatureInfo_Set_name(MR_Features_SubfeatureInfo *_this, const char *value, const char *value_end);
38
39// A user-friendly name.
44
45// Whether the feature has infinite length.
50
51// Whether the feature has infinite length.
56
57// Whether the feature has infinite length.
62
63// Call this to create this subfeature.
64// Pass the same feature you passed to `forEachSubfeature()`, or a DIFFERENT one to create the same kind of subfeature relative to that.
69
70// Call this to create this subfeature.
71// Pass the same feature you passed to `forEachSubfeature()`, or a DIFFERENT one to create the same kind of subfeature relative to that.
77
78// Call this to create this subfeature.
79// Pass the same feature you passed to `forEachSubfeature()`, or a DIFFERENT one to create the same kind of subfeature relative to that.
84
88
93
102
106
110
115
118
121
128
129// Decomposes a feature to its subfeatures, by calling `func()` on each subfeature.
130// This only returns the direct subfeatures. You can call this recursively to obtain all features,
131// but beware of duplicates (there's no easy way to filter them).
136
137#ifdef __cplusplus
138} // extern "C"
139#endif
struct MR_std_string_view MR_std_string_view
Definition MRDistanceMeasurementObject.h:39
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:25
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)
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
Definition MRSubfeatures.h:22
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)
MR_PassBy
Definition common.h:23
#define MRC_API
Definition exports.h:11
virtual std::string name() const override