MeshLib C Docs
Loading...
Searching...
No Matches
MRAngleMeasurementObject.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_MeasurementObject MR_MeasurementObject; // Defined in `#include <MRCMesh/MRMeasurementObject.h>`.
15typedef struct MR_Object MR_Object; // Defined in `#include <MRCMesh/MRObject.h>`.
16typedef struct MR_ObjectChildrenHolder MR_ObjectChildrenHolder; // Defined in `#include <MRCMesh/MRObject.h>`.
17typedef struct MR_VisualObject MR_VisualObject; // Defined in `#include <MRCMesh/MRVisualObject.h>`.
18typedef struct MR_std_shared_ptr_MR_Object MR_std_shared_ptr_MR_Object; // Defined in `#include <MRCMisc/std_shared_ptr_MR_Object.h>`.
19typedef struct MR_std_string MR_std_string; // Defined in `#include <MRCMisc/std_string.h>`.
20typedef struct MR_std_vector_std_string MR_std_vector_std_string; // Defined in `#include <MRCMisc/std_vector_std_string.h>`.
21
22
23// Represents an angle measurement.
33
37
42
45
48
52
55
59
62
66
69
73
76
80
83
86
91
94
98
103
108
113
118
119// Get the angle point in world coordinates.
123
124// Get the angle point in local coordinates.
128
129// One of the two rays representing the angle, relative to the starting point.
130// They can have length != 1 for visualization purposes, it's probably a good idea to take the smaller of the two lengths.
134
135// Same, but in local coordinates.
139
140// Set the angle point in the local coordinates.
145
146// Set the two rays representing the angle in the local coordinates.
147// The lengths are preserved.
153
154// Whether this is a conical angle. The middle line between the rays is preserved, but the rays themselves can be rotated.
158
162
163// Whether we should draw a ray from the center point to better visualize the angle. Enable this if there isn't already a line object there.
167
171
172// Computes the angle value, as if by `acos(dot(...))` from the two normalized `getWorldRay()`s.
176
181
182#ifdef __cplusplus
183} // extern "C"
184#endif
struct MR_VisualObject MR_VisualObject
Definition MRAddVisualPropertiesMixin.h:21
struct MR_ObjectChildrenHolder MR_ObjectChildrenHolder
Definition MRAddVisualPropertiesMixin.h:18
MRC_API void MR_AngleMeasurementObject_setIsConical(MR_AngleMeasurementObject *_this, bool value)
MRC_API MR_std_shared_ptr_MR_Object * MR_AngleMeasurementObject_clone(const MR_AngleMeasurementObject *_this)
MRC_API MR_AngleMeasurementObject * MR_AngleMeasurementObject_OffsetMutablePtr(MR_AngleMeasurementObject *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 void MR_AngleMeasurementObject_setLocalRays(MR_AngleMeasurementObject *_this, const MR_Vector3f *a, const MR_Vector3f *b)
MRC_API MR_MeasurementObject * MR_AngleMeasurementObject_MutableUpcastTo_MR_MeasurementObject(MR_AngleMeasurementObject *object)
Upcasts an instance of MR::AngleMeasurementObject to its base class MR::MeasurementObject.
MRC_API MR_Vector3f MR_AngleMeasurementObject_getWorldPoint(const MR_AngleMeasurementObject *_this)
MRC_API void MR_AngleMeasurementObject_Destroy(const MR_AngleMeasurementObject *_this)
Destroys a heap-allocated instance of MR_AngleMeasurementObject. Does nothing if the pointer is null.
MRC_API const MR_MeasurementObject * MR_AngleMeasurementObject_UpcastTo_MR_MeasurementObject(const MR_AngleMeasurementObject *object)
MRC_API MR_AngleMeasurementObject * MR_AngleMeasurementObject_AssignFromAnother(MR_AngleMeasurementObject *_this, MR_PassBy _other_pass_by, MR_AngleMeasurementObject *_other)
MRC_API MR_AngleMeasurementObject * MR_AngleMeasurementObject_DefaultConstruct(void)
MRC_API MR_ObjectChildrenHolder * MR_AngleMeasurementObject_MutableUpcastTo_MR_ObjectChildrenHolder(MR_AngleMeasurementObject *object)
Upcasts an instance of MR::AngleMeasurementObject to its base class MR::ObjectChildrenHolder.
MRC_API MR_Object * MR_AngleMeasurementObject_MutableUpcastTo_MR_Object(MR_AngleMeasurementObject *object)
Upcasts an instance of MR::AngleMeasurementObject to its base class MR::Object.
MRC_API const MR_AngleMeasurementObject * MR_AngleMeasurementObject_OffsetPtr(const MR_AngleMeasurementObject *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_AngleMeasurementObject MR_AngleMeasurementObject
Definition MRAngleMeasurementObject.h:32
MRC_API void MR_AngleMeasurementObject_setLocalPoint(MR_AngleMeasurementObject *_this, const MR_Vector3f *point)
MRC_API float MR_AngleMeasurementObject_computeAngle(const MR_AngleMeasurementObject *_this)
MRC_API MR_AngleMeasurementObject * MR_AngleMeasurementObject_ConstructFromAnother(MR_PassBy _other_pass_by, MR_AngleMeasurementObject *_other)
MRC_API MR_Vector3f MR_AngleMeasurementObject_getWorldRay(const MR_AngleMeasurementObject *_this, bool second)
MRC_API const char * MR_AngleMeasurementObject_typeName(const MR_AngleMeasurementObject *_this)
MRC_API MR_Vector3f MR_AngleMeasurementObject_getLocalRay(const MR_AngleMeasurementObject *_this, bool second)
MRC_API bool MR_AngleMeasurementObject_getIsConical(const MR_AngleMeasurementObject *_this)
MRC_API void MR_AngleMeasurementObject_setShouldVisualizeRay(MR_AngleMeasurementObject *_this, bool second, bool enable)
MRC_API const MR_Object * MR_AngleMeasurementObject_UpcastTo_MR_Object(const MR_AngleMeasurementObject *object)
MRC_API bool MR_AngleMeasurementObject_getShouldVisualizeRay(const MR_AngleMeasurementObject *_this, bool second)
MRC_API const MR_VisualObject * MR_AngleMeasurementObject_UpcastTo_MR_VisualObject(const MR_AngleMeasurementObject *object)
struct MR_std_shared_ptr_MR_Object MR_std_shared_ptr_MR_Object
Definition MRAngleMeasurementObject.h:18
MRC_API const char * MR_AngleMeasurementObject_TypeName(void)
Generated from a method of class MR::AngleMeasurementObject named TypeName.
MRC_API MR_Vector3f MR_AngleMeasurementObject_getLocalPoint(const MR_AngleMeasurementObject *_this)
MRC_API MR_AngleMeasurementObject * MR_AngleMeasurementObject_DefaultConstructArray(size_t num_elems)
struct MR_std_vector_std_string MR_std_vector_std_string
Definition MRAngleMeasurementObject.h:20
MRC_API void MR_AngleMeasurementObject_DestroyArray(const MR_AngleMeasurementObject *_this)
Destroys a heap-allocated array of MR_AngleMeasurementObject. Does nothing if the pointer is null.
MRC_API MR_VisualObject * MR_AngleMeasurementObject_MutableUpcastTo_MR_VisualObject(MR_AngleMeasurementObject *object)
Upcasts an instance of MR::AngleMeasurementObject to its base class MR::VisualObject.
MRC_API MR_std_vector_std_string * MR_AngleMeasurementObject_getInfoLines(const MR_AngleMeasurementObject *_this)
MRC_API MR_std_shared_ptr_MR_Object * MR_AngleMeasurementObject_shallowClone(const MR_AngleMeasurementObject *_this)
MRC_API MR_std_string * MR_AngleMeasurementObject_getClassName(const MR_AngleMeasurementObject *_this)
MRC_API MR_std_string * MR_AngleMeasurementObject_getClassNameInPlural(const MR_AngleMeasurementObject *_this)
MRC_API const MR_ObjectChildrenHolder * MR_AngleMeasurementObject_UpcastTo_MR_ObjectChildrenHolder(const MR_AngleMeasurementObject *object)
struct MR_MeasurementObject MR_MeasurementObject
Definition MRAngleMeasurementObject.h:14
struct MR_std_string MR_std_string
Definition MRE57.h:22
struct MR_Object MR_Object
Definition MRGltf.h:10
MR_PassBy
Definition common.h:19
#define MRC_API
Definition exports.h:11
Definition MRVector3.h:51