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