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;
9 {
10 public:
12 {
13 e_none
14 , e_location
15 , e_relative_to_model_w_distance_angle
16 , e_same_as_model
17 };
19 explicit LocationOperations(const Model& model);
20
21 void setLocation(const Vertex<3, fltp08>& location);
22 void setReferenceObject(const Model& reference);
23 void setReferenceObject(const UUID& reference);
24 void setReferenceObject(const UUID& reference, const Vector<3, Angle<fltp08>>& angle, fltp08 distance, bool is_location_relative);
25 void setReferenceObject(const Model& reference, const Vector<3, Angle<sint04>>& angle, fltp08 distance, bool is_location_relative);
26 void setReferenceObject(const Model& reference, const Vector<3, Angle<fltp08>>& angle, fltp08 distance, bool is_location_relative);
27 void setReferenceDistance(fltp08 distance);
28 Vector<3, Angle<fltp08>> relativeAngle() const;
29 fltp08 relativeDistance() const;
30 UUID referenceID() const;
31 LocationType locationType() const;
32 void setLocationType(const LocationType& type);
33 void updateLocation(DesignObjectLookup* lookup);
34 void autoUpdateLocationType();
35 UUID referenceModelA() const;
36
37 Vertex<3, fltp08> prismLocation(uint04 index) const;
38 bool isPrismEditable(uint04 location) const;
39 void setPrismLocation(uint04 index, const Vertex<3, fltp08>& vertex, bool is_editable);
40 uint04 prismCount() const;
41 uint04 activePrismIndex() const;
42 Vertex<3, fltp08> activePrismOffset() const;
43 bool activePrismEditable() const;
44 void setActivePrismIndex(uint04 index);
45 void setPrismOffset(const Vector<3, fltp08>& prism_offset, bool is_editable);
46 static bool HasDependency(const Model& object, const Model& potential_dependecy, DesignObjectLookup* lookup);
47 static bool HasDependency(const Model& object, const Model& potential_dependecy, const Buffer<Model>& models);
48 protected:
49 Vertex<3, fltp08> calculateFromReference(const Model& reference, const Vector<3, Angle<fltp08>>& angle, fltp08 distance, bool is_location_relative, const void* lock = nullptr);
50 };
51}
#define NDEVR_DESIGN_API
Definition DLLInfo.h:77
Stores an angle in an optimized format.
Definition StringStream.h:352
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition DesignObjectLookup.h:61
Definition LocationOperations.h:9
LocationType
Definition LocationOperations.h:12
Definition Model.h:54
Definition UUID.h:66
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
A vertex.
Definition Vertex.hpp:54
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:120
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181