33#include <NDEVR/Model.h>
34#if NDEVR_STATION_MODEL
38 class TextConstructor;
52 class NDEVR_DESIGN_API StationModel :
public Model
84 explicit StationModel(
const Model& model,
const void* lock =
nullptr);
93 void setLocation(
const Vector<3, fltp08>& location);
98 Vertex<3, fltp08> getLocation()
const;
103 bool isRectangular()
const;
108 bool isCircular()
const;
114 void setRectangular(
bool rectangular,
const void* lock =
nullptr);
119 void setPreferredSegmentDistance(fltp08 distance);
125 void setCircular(
bool circular,
const void* lock =
nullptr);
130 void updateStation(
const void* lock_ptr =
nullptr);
135 void updateStation(DesignObjectLookup* lookup);
140 void setFont(
const Font& font);
145 fltp08 preferredSegmentDistance()
const;
150 fltp08 stationRadius()
const;
155 Model stationLayer()
const;
160 bool areAxisLabelsVisible()
const;
165 bool areDistanceLabelsVisible()
const;
170 bool isDistanceLineworkVisible()
const;
175 bool isAxesLineworkVisible()
const;
181 void setTextFaceCamera(
bool face_camera);
187 static TranslatedString DefaultStationName(uint04 station_number);
194 static StationModel CreateDefault(Model target, DesignObjectLookup* lookup);
200 static StationModel CreateDefault(Model target);
207 static StationModel CreateDefault(Model target,
const Buffer<Model>& other_stations);
216 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());
221 static Vertex<3, fltp08> DefaultStationLocation();
226 void ensureModelFormat();
231 Model stationVisuals()
const;
236 Text stationTitle()
const;
241 Model circles()
const;
246 Model distanceText()
const;
251 Model boldCircles()
const;
261 Model azimuthModel();
276 Text text180Degree();
281 Text text270Degree();
286 const Text text0Degree()
const;
291 const Text text90Degree()
const;
296 const Text text180Degree()
const;
301 const Text text270Degree()
const;
306 Model rectangleRoot()
const;
311 void invalidateVisuals(
const void* lock =
nullptr);
316 void invalidateFont(
const void* lock =
nullptr);
321 static constexpr StringView TypeName() {
return StringView(
"station"); }
326 Model getRow()
const;
331 Model getPattern()
const;
336 uint04 getRowNumber()
const;
341 uint04 getHoleNumber()
const;
346 void setRowNumber(uint04 number);
351 void setHoleNumber(uint04 number);
356 void setAllowHeadingAdjustment(
bool allow);
361 bool allowHeadingAdjustment()
const;
366 void setAllowPlannedDeployment(
bool allow);
371 bool allowPlannedDeployment()
const;
376 void setAllowRelativePosition(
bool allow);
381 bool allowRelativePositionAdjustment()
const;
386 void setupRectangular();
390 void setupCircular();
396 void setDistanceTextVisible(
bool visible,
const void* lock =
nullptr);
402 void setTitleVisible(
bool visible,
const void* lock =
nullptr);
408 void setAxesLabelsVisible(
bool visible,
const void* lock =
nullptr);
414 void setDistanceLineworkVisible(
bool visible,
const void* lock =
nullptr);
420 void setAxesLineworkVisible(
bool visible,
const void* lock =
nullptr);
426 bool shouldShowTitle(
bool is_selected)
const;
432 bool shouldShowDistanceText(
bool is_selected)
const;
438 bool shouldShowDistanceLinework(
bool is_selected)
const;
444 bool shouldShowAxes(
bool is_selected)
const;
450 bool shouldShowAxesText(
bool is_selected)
const;
459 void updateVisualModels(
bool is_selected,
bool coord_space_changed,
const Bounds<3, fltp08>& bounds, fltp08 station_radius,
const void* lock_ptr);
463 void initializeStation();
467 void setupStationVisuals();
472 void updateTitle(
const void* lock_ptr);
476 void updateAxisText();
485 uint04 circleGeoIndex()
const;
489 void setupAzimuthModel();
498 void updateAllDistanceText(fltp08 station_radius, fltp08 epsilon, fltp08 text_size,
bool force,
bool selected);
504 void updateRings(fltp08 station_radius, fltp08 epsilon);
510 void updateRing(uint04 normal_index, fltp08 distance);
516 void updateBoldRing(uint04 bold_index, fltp08 distance);
525 void updateDistanceText(uint04 text_index, fltp08 distance, fltp08 bold_scale,
bool make_bold,
bool force);
527 mutable uint04 m_circle_geometry_index;
528 mutable fltp08 m_preferred_segment_distance;
A core class where all Design Objects including models, materials, and geometries are stored.
A core class that represents a node on model hierarchy.
The primary namespace for the NDEVR SDK.
@ e_angle
Angular measurement (e.g., degrees, radians).
@ e_none
No defined value type.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
@ e_line
A single-line range sensor measuring along one axis.