33#include <NDEVR/Model.h>
34#include <NDEVR/TextConstructor.h>
35#if NDEVR_STATION_MODEL
39 class TextConstructor;
40 class DesignObjectLookup;
62 explicit StationModel(
const Model& model,
const DynamicPointer<TextConstructor>& text_constructor = DynamicPointer<TextConstructor>());
64 void setLocation(
const Vector<3, fltp08>& location);
65 Vertex<3, fltp08> getLocation()
const;
66 bool isRectangular()
const;
67 bool isCircular()
const;
68 void setRectangular(
bool rectangular,
const void* lock =
nullptr);
69 void setPreferredSegmentDistance(fltp08 distance);
70 void setCircular(
bool circular,
const void* lock =
nullptr);
71 void update(
const void* lock_ptr =
nullptr);
72 void update(DesignObjectLookup* lookup);
73 void setFont(
const Font& font);
74 fltp08 preferredSegmentDistance()
const;
75 fltp08 stationRadius()
const;
76 Model stationLayer()
const;
77 bool areAxisLabelsVisible()
const;
78 bool areDistanceLabelsVisible()
const;
79 bool isDistanceLineworkVisible()
const;
80 bool isAxesLineworkVisible()
const;
81 void setupRectangular();
83 void setTextFaceCamera(
bool face_camera);
84 static TranslatedString DefaultStationName(uint04 station_number);
85 static StationModel CreateDefault(DesignObjectLookup* lookup);
86 static StationModel CreateDefault(Model& parent);
87 static StationModel CreateDefault(
const Buffer<Model>& other_stations, Model parent = Model());
88 static Vertex<3, fltp08> CalculateDefaultLocation(
const StationModel& new_station,
const Buffer<Model>& other_stations, StationLayout layout = StationLayout::e_spiral, Vector<3, fltp08> starting_offset = DefaultStationLocation());
89 static Vertex<3, fltp08> DefaultStationLocation();
90 DynamicPointer<TextConstructor> textConstructor()
const;
91 void ensureModelFormat();
92 Model stationVisuals()
const;
93 Text stationTitle()
const;
94 Model circles()
const;
95 Model distanceText()
const;
96 Model boldCircles()
const;
101 Text text180Degree();
102 Text text270Degree();
103 const Text text0Degree()
const;
104 const Text text90Degree()
const;
105 const Text text180Degree()
const;
106 const Text text270Degree()
const;
107 Model rectangleRoot()
const;
108 void invalidateVisuals(
const void* lock =
nullptr);
109 void invalidateFont(
const void* lock =
nullptr);
110 static constexpr const char* TypeName() {
return "station"; }
112 Model getRow()
const;
113 Model getPattern()
const;
114 uint04 getRowNumber()
const;
115 uint04 getHoleNumber()
const;
116 void setRowNumber(uint04 number);
117 void setHoleNumber(uint04 number);
118 void setAllowHeadingAdjustment(
bool allow);
119 bool allowHeadingAdjustment()
const;
120 void setAllowPlannedDeployment(
bool allow);
121 bool allowPlannedDeployment()
const;
122 void setAllowRelativePosition(
bool allow);
123 bool allowRelativePositionAdjustment()
const;
125 void setDistanceTextVisible(
bool visible,
const void* lock =
nullptr);
126 void setTitleVisible(
bool visible,
const void* lock =
nullptr);
127 void setAxesLabelsVisible(
bool visible,
const void* lock =
nullptr);
128 void setDistanceLineworkVisible(
bool visible,
const void* lock =
nullptr);
129 void setAxesLineworkVisible(
bool visible,
const void* lock =
nullptr);
130 bool shouldShowTitle(
bool is_selected)
const;
131 bool shouldShowDistanceText(
bool is_selected)
const;
132 bool shouldShowDistanceLinework(
bool is_selected)
const;
133 bool shouldShowAxes(
bool is_selected)
const;
134 bool shouldShowAxesText(
bool is_selected)
const;
135 void updateVisualModels(
bool is_selected,
bool coord_space_changed,
const Bounds<3, fltp08>& bounds, fltp08 station_radius,
const void* lock_ptr);
136 void initializeStation();
137 void setupStationVisuals();
138 void updateTitle(
const void* lock_ptr);
139 void updateAxisText();
141 uint04 circleGeoIndex()
const;
142 void setupAzimuthModel();
143 void updateAllDistanceText(fltp08 station_radius, fltp08 epsilon, fltp08 text_size,
bool force,
bool selected);
144 void updateRings(fltp08 station_radius, fltp08 epsilon);
145 void updateRing(uint04 normal_index, fltp08 distance);
146 void updateBoldRing(uint04 bold_index, fltp08 distance);
147 void updateDistanceText(uint04 text_index, fltp08 distance, fltp08 bold_scale,
bool make_bold,
bool force);
149 DynamicPointer<TextConstructor> m_text_constructor;
150 mutable uint04 m_circle_geometry_index;
151 mutable fltp08 m_preferred_segment_distance;
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
@ e_line
Definition RangeSensor.h:41