MeshLib C Docs
Loading...
Searching...
No Matches
MRObjectComparableWithReference.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRCMisc/exports.h>
4
5#include <stdbool.h>
6#include <stddef.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty; // Defined in `#include <MRCMisc/std_optional_MR_ObjectComparableWithReference_ComparableProperty.h>`.
13typedef struct MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance; // Defined in `#include <MRCMisc/std_optional_MR_ObjectComparableWithReference_ComparisonTolerance.h>`.
14typedef struct MR_std_optional_float MR_std_optional_float; // Defined in `#include <MRCMisc/std_optional_float.h>`.
15typedef struct MR_std_string_view MR_std_string_view; // Defined in `#include <MRCMisc/std_string_view.h>`.
16typedef struct MR_std_variant_float_MR_Vector3f MR_std_variant_float_MR_Vector3f; // Defined in `#include <MRCMisc/std_variant_float_MR_Vector3f.h>`.
17
18
22
23// Tolerances:
27
28// This can't be `std::optional<Var>`, because we still need the variant to know the correct type.
32
33// A base class for a data-model object that is a feature/measurement that can be compared between two models.
40
43
46
47// When comparing this object with a reference, how many different properties can we output?
51
52// `i` goes up to `numComparableProperties()`, exclusive.
57
58// Compute a value of a property.
59// Compare `value` and `referenceValue` using the tolerance.
60// 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
61// we're computing the distance to a reference point).
62// `i` goes up to `numComparableProperties()`, exclusive.
67
68// Returns the tolerance for a specific comparable property. Returns null if not set.
69// `i` goes up to `numComparableProperties()`, exclusive.
74
75// Sets the tolerance for a specific comparable property.
76// `i` goes up to `numComparableProperties()`, exclusive.
82
83// If true, indicates that the getter will always return zero negative tolerance, and the setter will ignore the negative tolerance.
84// `i` goes up to `numComparableProperties()`, exclusive.
88
89// The number and types of reference values can be entirely different compared to `numComparableProperties()`.
93
94// `i` goes up to `numComparisonReferenceValues()`, exclusive.
99
100// Returns the internal reference value.
101// If the value wasn't set yet (as indicated by `isSet == false`), you can still use the returned variant to get the expected type.
102// `i` goes up to `numComparisonReferenceValues()`, exclusive.
107
108// Sets the internal reference value. Makes `hasComparisonReferenceValue()` return true.
109// If you pass nullopt, removes this reference value.
110// Only a certain variant type is legal to pass, depending on the derived class and the index. Use `getComparisonReferenceValue()` to determine that type.
111// `i` goes up to `numComparisonReferenceValues()`, exclusive.
117
122
126
130
136
141
147
148// This can be null if the reference value isn't set, or something else is wrong.
149// This can match whatever is set via `get/setComparisonReferenceValue()`, but not necessarily.
150// E.g. for point coordinates, those functions act on the reference coordinates (three optional floats), but this number is always zero,
151// and the `value` is the distance to those coordinates.
157
158// This can be null if the reference value isn't set, or something else is wrong.
159// This can match whatever is set via `get/setComparisonReferenceValue()`, but not necessarily.
160// E.g. for point coordinates, those functions act on the reference coordinates (three optional floats), but this number is always zero,
161// and the `value` is the distance to those coordinates.
168
169// This can be null if the reference value isn't set, or something else is wrong.
170// This can match whatever is set via `get/setComparisonReferenceValue()`, but not necessarily.
171// E.g. for point coordinates, those functions act on the reference coordinates (three optional floats), but this number is always zero,
172// and the `value` is the distance to those coordinates.
178
182
187
194
198
202
208
211
214
222
223// How much larger can this value be compared to the reference?
229
230// How much larger can this value be compared to the reference?
235
236// How much larger can this value be compared to the reference?
242
243// How much smaller can this value be compared to the reference?
244// This number should normally be zero or negative.
250
251// How much smaller can this value be compared to the reference?
252// This number should normally be zero or negative.
257
258// How much smaller can this value be compared to the reference?
259// This number should normally be zero or negative.
265
269
274
279
283
287
293
296
299
307
313
318
324
325// If `isSet == false`, this will hold zeroes, or some other default values.
331
332// If `isSet == false`, this will hold zeroes, or some other default values.
339
340// If `isSet == false`, this will hold zeroes, or some other default values.
346
350
355
362
366
370
376
379
382
390
391#ifdef __cplusplus
392} // extern "C"
393#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_ObjectComparableWithReference_ComparisonReferenceValue * MR_ObjectComparableWithReference_getComparisonReferenceValue(const MR_ObjectComparableWithReference *_this, size_t i)
MRC_API size_t MR_ObjectComparableWithReference_numComparisonReferenceValues(const MR_ObjectComparableWithReference *_this)
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)
struct MR_ObjectComparableWithReference_ComparableProperty MR_ObjectComparableWithReference_ComparableProperty
Definition MRObjectComparableWithReference.h:21
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 size_t MR_ObjectComparableWithReference_numComparableProperties(const MR_ObjectComparableWithReference *_this)
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 void MR_ObjectComparableWithReference_setComparisonTolerance(MR_ObjectComparableWithReference *_this, size_t i, const MR_ObjectComparableWithReference_ComparisonTolerance *newTolerance)
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 bool MR_ObjectComparableWithReference_comparisonToleranceIsAlwaysOnlyPositive(const MR_ObjectComparableWithReference *_this, size_t i)
MRC_API MR_std_string_view * MR_ObjectComparableWithReference_getComparablePropertyName(const MR_ObjectComparableWithReference *_this, size_t i)
MRC_API MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_ComparableProperty_ConstructFromAnother(const MR_ObjectComparableWithReference_ComparableProperty *_other)
MRC_API MR_std_optional_MR_ObjectComparableWithReference_ComparableProperty * MR_ObjectComparableWithReference_computeComparableProperty(const MR_ObjectComparableWithReference *_this, size_t i)
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_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 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 void MR_ObjectComparableWithReference_setComparisonReferenceValue(MR_ObjectComparableWithReference *_this, size_t i, const MR_std_variant_float_MR_Vector3f *value)
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_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 MR_std_string_view * MR_ObjectComparableWithReference_getComparisonReferenceValueName(const MR_ObjectComparableWithReference *_this, size_t i)
MRC_API MR_std_optional_MR_ObjectComparableWithReference_ComparisonTolerance * MR_ObjectComparableWithReference_getComparisonTolerence(const MR_ObjectComparableWithReference *_this, size_t i)
MRC_API void MR_ObjectComparableWithReference_ComparisonTolerance_Destroy(const MR_ObjectComparableWithReference_ComparisonTolerance *_this)
Destroys a heap-allocated instance of MR_ObjectComparableWithReference_ComparisonTolerance....
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 void MR_ObjectComparableWithReference_setComparisonReferenceVal(MR_ObjectComparableWithReference *_this, size_t i, const MR_ObjectComparableWithReference_ComparisonReferenceValue *value)
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....
#define MRC_API
Definition include/MRCMisc/exports.h:11