NDEVR
API Documentation
OrientationOperations.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Model.h>
4namespace NDEVR
5{
18 class NDEVR_DESIGN_API OrientationOperations : public Model
19 {
20 public:
33
38
44 explicit OrientationOperations(uint01 dimension, const Model& model);
45
51 void clearOrientation(const void* lock = nullptr);
52
58 void setSpecifiedAngle(const Angle<fltp08>& azimuth, const void* lock = nullptr);
59
66 void setOffsetAngle(const Angle<fltp08>& azimuth, const void* lock = nullptr);
67
74 void setMagneticAngle(const Angle<fltp08>& magnetic_angle, const void* lock = nullptr);
75
81 void setFrontLocation(const Vertex<3, fltp08>& front_location, const void* lock = nullptr);
82
88 void setBackLocation(const Vertex<3, fltp08>& back_location, const void* lock = nullptr);
89
96 void setReferencePoints(const Vertex<3, fltp08>& location_a, const Vertex<3, fltp08>& location_b, const void* lock = nullptr);
97
106 void setReferenceModels(const UUID& front_reference, const UUID& back_reference, const void* lock = nullptr);
107
114 void setMirrorFromAzimuth(const UUID& reference, const void* lock = nullptr);
115
122 void setBackReferenceModel(const UUID& reference, bool is_relative, const void* lock = nullptr);
123
130 void setFrontReferenceModel(const UUID& reference, bool is_relative, const void* lock = nullptr);
131
137
143
149
155
160 bool isRelative() const;
161
167
173
179
185
190 void setAziType(const AzimuthType& type);
191
199
206 void updateAzimuth(const void* lock = nullptr);
207
213
219 private:
226 void _setAzimuth(const Angle<fltp08>& azimuth, const void* lock = nullptr);
227
228 const uint01 m_dimension;
229 };
230}
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
A core class where all Design Objects including models, materials, and geometries are stored.
Model()
Default constructor. Creates an uninitialized Model.
Definition Model.h:365
void autoUpdateAzimuthType()
Automatically determines and sets the AzimuthType based on which metadata fields are populated (refer...
void setOffsetAngle(const Angle< fltp08 > &azimuth, const void *lock=nullptr)
Sets an additional offset angle that is added to the computed orientation during updates.
void setSpecifiedAngle(const Angle< fltp08 > &azimuth, const void *lock=nullptr)
Sets the orientation to a directly specified angle and stores it in metadata.
Vertex< 3, fltp08 > aziLocationA() const
Returns the front (primary) reference location used for two-point orientation.
StringView prefix() const
Returns the metadata key prefix for this dimension ("roll", "pitch", or "azi").
Angle< fltp08 > specifiedAngle() const
Returns the user-specified angle stored in metadata.
void setFrontLocation(const Vertex< 3, fltp08 > &front_location, const void *lock=nullptr)
Sets the front (primary) reference location for two-point orientation.
OrientationOperations()
Default constructor.
void setAziType(const AzimuthType &type)
Sets the azimuth type that determines how orientation is computed.
AzimuthType
Describes the method used to determine the azimuth (or roll/pitch) angle.
@ e_specified_angle
A user-specified angle value is used directly.
@ e_inverse_of_model
The angle is the inverse (negation) of a reference model's angle.
@ e_none
No orientation is applied.
@ e_magnetic_angle
A magnetic bearing is used, with declination correction applied during updates.
@ e_two_point_location
The angle is derived from two reference points or models.
@ e_same_as_model
The angle is copied from a reference model.
Angle< fltp08 > offsetAngle() const
Returns the offset angle that is added to the computed orientation during updates.
UUID aziReferenceA() const
Returns the UUID of the front reference model.
Vertex< 3, fltp08 > aziLocationB() const
Returns the back (secondary) reference location used for two-point orientation.
void setReferencePoints(const Vertex< 3, fltp08 > &location_a, const Vertex< 3, fltp08 > &location_b, const void *lock=nullptr)
Sets both reference points for two-point orientation at once.
UUID aziReferenceB() const
Returns the UUID of the back reference model.
void setBackLocation(const Vertex< 3, fltp08 > &back_location, const void *lock=nullptr)
Sets the back (secondary) reference location for two-point orientation.
Angle< fltp08 > magneticAngle() const
Returns the magnetic bearing angle stored in metadata.
OrientationOperations(uint01 dimension, const Model &model)
Constructs an OrientationOperations for a specific rotational axis of a model.
AzimuthType aziType() const
Returns the current azimuth type that determines how orientation is computed.
void updateAzimuth(DesignObjectLookup *lookup)
Recomputes and applies the orientation using the current azimuth type and a DesignObjectLookup for re...
bool isRelative() const
Returns whether the orientation is computed relative to the reference model's rotation.
void setBackReferenceModel(const UUID &reference, bool is_relative, const void *lock=nullptr)
Sets the back reference model and whether the orientation is relative to that model.
void setFrontReferenceModel(const UUID &reference, bool is_relative, const void *lock=nullptr)
Sets the front reference model and whether the orientation is relative to that model.
void setMagneticAngle(const Angle< fltp08 > &magnetic_angle, const void *lock=nullptr)
Sets the magnetic bearing angle and stores it in metadata.
void setMirrorFromAzimuth(const UUID &reference, const void *lock=nullptr)
Configures this model to mirror its orientation from a single reference model.
void clearOrientation(const void *lock=nullptr)
Resets the orientation for this dimension to zero and clears all associated metadata (angle,...
void updateAzimuth(const void *lock=nullptr)
Recomputes and applies the orientation using only locally stored metadata (no model resolution).
void setReferenceModels(const UUID &front_reference, const UUID &back_reference, const void *lock=nullptr)
Sets two reference models whose positions define the orientation direction.
The core String View class for the NDEVR API.
Definition StringView.h:58
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
A point in N-dimensional space, used primarily for spatial location information.
Definition Vertex.hpp:44
The primary namespace for the NDEVR SDK.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...