API Documentation
Loading...
Searching...
No Matches
LocationOperations.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Model.h>
4#include <NDEVR/Vertex.h>
5namespace NDEVR
6{
7 class DesignObjectLookup;
8 /**--------------------------------------------------------------------------------------------------
9 \brief A Model which contains logic for dynamically setting the location of an object relative to
10 information that might dynamically change
11 **/
13 {
14 public:
16 {
17 e_none
18 , e_location
19 , e_relative_to_model_w_distance_angle
20 , e_same_as_model
21 };
23 explicit LocationOperations(const Model& model);
24
25 void setLocation(const Vertex<3, fltp08>& location);
26 void setReferenceObject(const Model& reference);
27 void setReferenceObject(const UUID& reference);
28 void setReferenceObject(const UUID& reference, const Vector<3, Angle<fltp08>>& angle, fltp08 distance, bool is_location_relative);
29 void setReferenceObject(const Model& reference, const Vector<3, Angle<sint04>>& angle, fltp08 distance, bool is_location_relative);
30 void setReferenceObject(const Model& reference, const Vector<3, Angle<fltp08>>& angle, fltp08 distance, bool is_location_relative);
36 void setLocationType(const LocationType& type);
40
42 bool isPrismEditable(uint04 location) const;
43 void setPrismLocation(uint04 index, const Vertex<3, fltp08>& vertex, bool is_editable);
47 bool activePrismEditable() const;
49 void setPrismOffset(const Vector<3, fltp08>& prism_offset, bool is_editable);
50 static bool HasDependency(const Model& object, const Model& potential_dependecy, DesignObjectLookup* lookup);
51 static bool HasDependency(const Model& object, const Model& potential_dependecy, const Buffer<Model>& models);
52 protected:
53 Vertex<3, fltp08> calculateFromReference(const Model& reference, const Vector<3, Angle<fltp08>>& angle, fltp08 distance, bool is_location_relative, const void* lock = nullptr);
54 };
55}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A core class where all Design Objects including models, materials, and geometries are stored....
Definition DesignObjectLookup.h:65
A Model which contains logic for dynamically setting the location of an object relative to informatio...
Definition LocationOperations.h:13
static bool HasDependency(const Model &object, const Model &potential_dependecy, DesignObjectLookup *lookup)
fltp08 relativeDistance() const
void updateLocation(DesignObjectLookup *lookup)
void setReferenceObject(const UUID &reference, const Vector< 3, Angle< fltp08 > > &angle, fltp08 distance, bool is_location_relative)
Vertex< 3, fltp08 > calculateFromReference(const Model &reference, const Vector< 3, Angle< fltp08 > > &angle, fltp08 distance, bool is_location_relative, const void *lock=nullptr)
bool isPrismEditable(uint04 location) const
LocationType locationType() const
void setPrismOffset(const Vector< 3, fltp08 > &prism_offset, bool is_editable)
void setActivePrismIndex(uint04 index)
LocationOperations(const Model &model)
Vector< 3, Angle< fltp08 > > relativeAngle() const
static bool HasDependency(const Model &object, const Model &potential_dependecy, const Buffer< Model > &models)
Vertex< 3, fltp08 > prismLocation(uint04 index) const
void setLocationType(const LocationType &type)
void setReferenceObject(const Model &reference, const Vector< 3, Angle< sint04 > > &angle, fltp08 distance, bool is_location_relative)
uint04 activePrismIndex() const
bool activePrismEditable() const
void setReferenceObject(const Model &reference, const Vector< 3, Angle< fltp08 > > &angle, fltp08 distance, bool is_location_relative)
void setPrismLocation(uint04 index, const Vertex< 3, fltp08 > &vertex, bool is_editable)
void setReferenceObject(const Model &reference)
Vertex< 3, fltp08 > activePrismOffset() const
uint04 prismCount() const
UUID referenceModelA() const
void setReferenceDistance(fltp08 distance)
void setLocation(const Vertex< 3, fltp08 > &location)
LocationType
Definition LocationOperations.h:16
void setReferenceObject(const UUID &reference)
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149