MeshLib C Docs
Loading...
Searching...
No Matches
MRObjectComparableWithReference.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
13typedef struct MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty; // Defined in `#include <MRCMisc/std_optional_MR_ObjectComparableWithReference_ComparableProperty.h>`.
14typedef struct MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance; // Defined in `#include <MRCMisc/std_optional_MR_ObjectComparableWithReference_ComparisonTolerance.h>`.
15typedef struct MR_std_optional_float MR_std_optional_float; // Defined in `#include <MRCMisc/std_optional_float.h>`.
16typedef struct MR_std_string_view MR_std_string_view; // Defined in `#include <MRCMisc/std_string_view.h>`.
17typedef struct MR_std_variant_float_MR_Vector3f MR_std_variant_float_MR_Vector3f; // Defined in `#include <MRCMisc/std_variant_float_MR_Vector3f.h>`.
18
19
23
24// Tolerances:
28
29// This can't be `std::optional<Var>`, because we still need the variant to know the correct type.
33
34// A base class for a data-model object that is a feature/measurement that can be compared between two models.
41
44
47
48// When comparing this object with a reference, how many different properties can we output?
52
53// `i` goes up to `numComparableProperties()`, exclusive.
58
59// Compute a value of a property.
60// Compare `value` and `referenceValue` using the tolerance.
61// This can return null if the value is impossible to compute, e.g. for some types if the reference isn't set (e.g. if
62// we're computing the distance to a reference point).
63// `i` goes up to `numComparableProperties()`, exclusive.
68
69// Returns the tolerance for a specific comparable property. Returns null if not set.
70// `i` goes up to `numComparableProperties()`, exclusive.
75
76// Sets the tolerance for a specific comparable property.
77// `i` goes up to `numComparableProperties()`, exclusive.
83
84// If true, indicates that the getter will always return zero negative tolerance, and the setter will ignore the negative tolerance.
85// `i` goes up to `numComparableProperties()`, exclusive.
89
90// The number and types of reference values can be entirely different compared to `numComparableProperties()`.
94
95// `i` goes up to `numComparisonReferenceValues()`, exclusive.
100
101// Returns the internal reference value.
102// If the value wasn't set yet (as indicated by `isSet == false`), you can still use the returned variant to get the expected type.
103// `i` goes up to `numComparisonReferenceValues()`, exclusive.
108
109// Sets the internal reference value. Makes `hasComparisonReferenceValue()` return true.
110// If you pass nullopt, removes this reference value.
111// Only a certain variant type is legal to pass, depending on the derived class and the index. Use `getComparisonReferenceValue()` to determine that type.
112// `i` goes up to `numComparisonReferenceValues()`, exclusive.
118
123
127
131
137
142
148
149// This can be null if the reference value isn't set, or something else is wrong.
150// This can match whatever is set via `get/setComparisonReferenceValue()`, but not necessarily.
151// E.g. for point coordinates, those functions act on the reference coordinates (three optional floats), but this number is always zero,
152// and the `value` is the distance to those coordinates.
158
159// This can be null if the reference value isn't set, or something else is wrong.
160// This can match whatever is set via `get/setComparisonReferenceValue()`, but not necessarily.
161// E.g. for point coordinates, those functions act on the reference coordinates (three optional floats), but this number is always zero,
162// and the `value` is the distance to those coordinates.
169
170// This can be null if the reference value isn't set, or something else is wrong.
171// This can match whatever is set via `get/setComparisonReferenceValue()`, but not necessarily.
172// E.g. for point coordinates, those functions act on the reference coordinates (three optional floats), but this number is always zero,
173// and the `value` is the distance to those coordinates.
179
183
188
195
199
203
209
212
215
223
224// How much larger can this value be compared to the reference?
230
231// How much larger can this value be compared to the reference?
236
237// How much larger can this value be compared to the reference?
243
244// How much smaller can this value be compared to the reference?
245// This number should normally be zero or negative.
251
252// How much smaller can this value be compared to the reference?
253// This number should normally be zero or negative.
258
259// How much smaller can this value be compared to the reference?
260// This number should normally be zero or negative.
266
270
275
280
284
288
294
297
300
308
314
319
325
326// If `isSet == false`, this will hold zeroes, or some other default values.
332
333// If `isSet == false`, this will hold zeroes, or some other default values.
340
341// If `isSet == false`, this will hold zeroes, or some other default values.
347
351
356
363
367
371
377
380
383
391
392#ifdef __cplusplus
393} // extern "C"
394#endif
struct MR_std_optional_float MR_std_optional_float
Definition MRBestFitPolynomial.h:14
struct MR_std_string_view MR_std_string_view
Definition MRDistanceMeasurementObject.h:39
struct MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty
Definition MRDistanceMeasurementObject.h:34
struct MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance
Definition MRDistanceMeasurementObject.h:35
struct MR_ObjectComparableWithReference MR_ObjectComparableWithReference
Definition MRDistanceMeasurementObject.h:25
struct MR_ObjectComparableWithReference_ComparisonTolerance MR_ObjectComparableWithReference_ComparisonTolerance
Definition MRDistanceMeasurementObject.h:27
struct MR_ObjectComparableWithReference_ComparisonReferenceValue MR_ObjectComparableWithReference_ComparisonReferenceValue
Definition MRDistanceMeasurementObject.h:26
struct MR_std_variant_float_MR_Vector3f MR_std_variant_float_MR_Vector3f
Definition MRDistanceMeasurementObject.h:40
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_DefaultConstruct(void)
MRC_API MR_uint64_t MR_ObjectComparableWithReference_numComparableProperties(const MR_ObjectComparableWithReference *_this)
MRC_API void MR_ObjectComparableWithReference_setComparisonReferenceValue(MR_ObjectComparableWithReference *_this, MR_uint64_t i, const MR_std_variant_float_MR_Vector3f *value)
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_OffsetMutablePtr(MR_ObjectComparableWithReference_ComparisonReferenceValue *ptr, ptrdiff_t i)
MRC_API MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_OffsetMutablePtr(MR_ObjectComparableWithReference_ComparisonTolerance *ptr, ptrdiff_t i)
MRC_API const float * MR_ObjectComparableWithReference_ComparisonTolerance_Get_negative(const MR_ObjectComparableWithReference_ComparisonTolerance *_this)
MRC_API void MR_ObjectComparableWithReference_ComparisonTolerance_DestroyArray(const MR_ObjectComparableWithReference_ComparisonTolerance *_this)
Destroys a heap-allocated array of MR_ObjectComparableWithReference_ComparisonTolerance....
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_DefaultConstructArray(size_t num_elems)
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_ConstructFromAnother(const MR_ObjectComparableWithReference_ComparisonReferenceValue *_other)
MRC_API const float * MR_ObjectComparableWithReference_ComparisonTolerance_Get_positive(const MR_ObjectComparableWithReference_ComparisonTolerance *_this)
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_ConstructFrom(float value, const float *referenceValue)
MRC_API float * MR_ObjectComparableWithReference_ComparisonTolerance_GetMutable_negative(MR_ObjectComparableWithReference_ComparisonTolerance *_this)
MRC_API float * MR_ObjectComparableWithReference_ComparisonTolerance_GetMutable_positive(MR_ObjectComparableWithReference_ComparisonTolerance *_this)
MRC_API void MR_ObjectComparableWithReference_Destroy(const MR_ObjectComparableWithReference *_this)
Destroys a heap-allocated instance of MR_ObjectComparableWithReference. Does nothing if the pointer i...
MRC_API const MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_OffsetPtr(const MR_ObjectComparableWithReference_ComparisonTolerance *ptr, ptrdiff_t i)
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_AssignFromAnother(MR_ObjectComparableWithReference_ComparisonReferenceValue *_this, const MR_ObjectComparableWithReference_ComparisonReferenceValue *_other)
MRC_API void MR_ObjectComparableWithReference_ComparisonTolerance_Set_negative(MR_ObjectComparableWithReference_ComparisonTolerance *_this, float value)
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_AssignFromAnother(MR_ObjectComparableWithReference_ComparableProperty *_this, const MR_ObjectComparableWithReference_ComparableProperty *_other)
MRC_API MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_getComparisonTolerence(const MR_ObjectComparableWithReference *_this, MR_uint64_t i)
struct MR_ObjectComparableWithReference_ComparableProperty MR_ObjectComparableWithReference_ComparableProperty
Definition MRObjectComparableWithReference.h:22
MRC_API const float * MR_ObjectComparableWithReference_ComparableProperty_Get_value(const MR_ObjectComparableWithReference_ComparableProperty *_this)
MRC_API void MR_ObjectComparableWithReference_ComparableProperty_DestroyArray(const MR_ObjectComparableWithReference_ComparableProperty *_this)
Destroys a heap-allocated array of MR_ObjectComparableWithReference_ComparableProperty....
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_DefaultConstructArray(size_t num_elems)
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_ConstructFrom(bool isSet, const MR_std_variant_float_MR_Vector3f *var)
MRC_API const MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_ComparisonReferenceValue_OffsetPtr(const MR_ObjectComparableWithReference_ComparisonReferenceValue *ptr, ptrdiff_t i)
MRC_API MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_ConstructFromAnother(const MR_ObjectComparableWithReference_ComparisonTolerance *_other)
MRC_API void MR_ObjectComparableWithReference_ComparisonReferenceValue_Set_isSet(MR_ObjectComparableWithReference_ComparisonReferenceValue *_this, bool value)
MRC_API MR_uint64_t MR_ObjectComparableWithReference_numComparisonReferenceValues(const MR_ObjectComparableWithReference *_this)
MRC_API MR_std_string_view * MR_ObjectComparableWithReference_getComparablePropertyName(const MR_ObjectComparableWithReference *_this, MR_uint64_t i)
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_ConstructFromAnother(const MR_ObjectComparableWithReference_ComparableProperty *_other)
MRC_API void MR_ObjectComparableWithReference_ComparisonReferenceValue_Destroy(const MR_ObjectComparableWithReference_ComparisonReferenceValue *_this)
Destroys a heap-allocated instance of MR_ObjectComparableWithReference_ComparisonReferenceValue....
MRC_API void MR_ObjectComparableWithReference_setComparisonTolerance(MR_ObjectComparableWithReference *_this, MR_uint64_t i, const MR_ObjectComparableWithReference_ComparisonTolerance *newTolerance)
MRC_API void MR_ObjectComparableWithReference_ComparisonReferenceValue_Set_var(MR_ObjectComparableWithReference_ComparisonReferenceValue *_this, const MR_std_variant_float_MR_Vector3f *value)
MRC_API MR_std_optional_float * MR_ObjectComparableWithReference_ComparableProperty_GetMutable_referenceValue(MR_ObjectComparableWithReference_ComparableProperty *_this)
MRC_API bool MR_ObjectComparableWithReference_comparisonToleranceIsAlwaysOnlyPositive(const MR_ObjectComparableWithReference *_this, MR_uint64_t i)
MRC_API const MR_ObjectComparableWithReference * MR_ObjectComparableWithReference_OffsetPtr(const MR_ObjectComparableWithReference *ptr, ptrdiff_t i)
MRC_API void MR_ObjectComparableWithReference_ComparisonReferenceValue_DestroyArray(const MR_ObjectComparableWithReference_ComparisonReferenceValue *_this)
Destroys a heap-allocated array of MR_ObjectComparableWithReference_ComparisonReferenceValue....
MRC_API void MR_ObjectComparableWithReference_DestroyArray(const MR_ObjectComparableWithReference *_this)
Destroys a heap-allocated array of MR_ObjectComparableWithReference. Does nothing if the pointer is n...
MRC_API MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_DefaultConstructArray(size_t num_elems)
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_OffsetMutablePtr(MR_ObjectComparableWithReference_ComparableProperty *ptr, ptrdiff_t i)
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_DefaultConstruct(void)
MRC_API MR_std_string_view * MR_ObjectComparableWithReference_getComparisonReferenceValueName(const MR_ObjectComparableWithReference *_this, MR_uint64_t i)
MRC_API MR_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_getComparisonReferenceValue(const MR_ObjectComparableWithReference *_this, MR_uint64_t i)
MRC_API const MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_OffsetPtr(const MR_ObjectComparableWithReference_ComparableProperty *ptr, ptrdiff_t i)
MRC_API MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_AssignFromAnother(MR_ObjectComparableWithReference_ComparisonTolerance *_this, const MR_ObjectComparableWithReference_ComparisonTolerance *_other)
MRC_API const MR_std_variant_float_MR_Vector3f * MR_ObjectComparableWithReference_ComparisonReferenceValue_Get_var(const MR_ObjectComparableWithReference_ComparisonReferenceValue *_this)
MRC_API void MR_ObjectComparableWithReference_ComparisonTolerance_Set_positive(MR_ObjectComparableWithReference_ComparisonTolerance *_this, float value)
MRC_API MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_computeComparableProperty(const MR_ObjectComparableWithReference *_this, MR_uint64_t i)
MRC_API MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_ConstructFrom(float positive, float negative)
MRC_API float * MR_ObjectComparableWithReference_ComparableProperty_GetMutable_value(MR_ObjectComparableWithReference_ComparableProperty *_this)
MRC_API void MR_ObjectComparableWithReference_ComparableProperty_Set_value(MR_ObjectComparableWithReference_ComparableProperty *_this, float value)
MRC_API void MR_ObjectComparableWithReference_ComparableProperty_Set_referenceValue(MR_ObjectComparableWithReference_ComparableProperty *_this, const float *value)
MRC_API MR_ObjectComparableWithReference * MR_ObjectComparableWithReference_OffsetMutablePtr(MR_ObjectComparableWithReference *ptr, ptrdiff_t i)
MRC_API const bool * MR_ObjectComparableWithReference_ComparisonReferenceValue_Get_isSet(const MR_ObjectComparableWithReference_ComparisonReferenceValue *_this)
MRC_API void MR_ObjectComparableWithReference_ComparisonTolerance_Destroy(const MR_ObjectComparableWithReference_ComparisonTolerance *_this)
Destroys a heap-allocated instance of MR_ObjectComparableWithReference_ComparisonTolerance....
MRC_API void MR_ObjectComparableWithReference_setComparisonReferenceVal(MR_ObjectComparableWithReference *_this, MR_uint64_t i, const MR_ObjectComparableWithReference_ComparisonReferenceValue *value)
MRC_API bool * MR_ObjectComparableWithReference_ComparisonReferenceValue_GetMutable_isSet(MR_ObjectComparableWithReference_ComparisonReferenceValue *_this)
MRC_API MR_std_variant_float_MR_Vector3f * MR_ObjectComparableWithReference_ComparisonReferenceValue_GetMutable_var(MR_ObjectComparableWithReference_ComparisonReferenceValue *_this)
MRC_API const MR_std_optional_float * MR_ObjectComparableWithReference_ComparableProperty_Get_referenceValue(const MR_ObjectComparableWithReference_ComparableProperty *_this)
MRC_API MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_ComparisonTolerance_DefaultConstruct(void)
MRC_API void MR_ObjectComparableWithReference_ComparableProperty_Destroy(const MR_ObjectComparableWithReference_ComparableProperty *_this)
Destroys a heap-allocated instance of MR_ObjectComparableWithReference_ComparableProperty....
uint64_t MR_uint64_t
Definition common.h:18
#define MRC_API
Definition include/MRCMisc/exports.h:11