34#include <NDEVR/SnapController.h>
35#if NDEVR_VIEWPORT && NDEVR_MEASURE_MODELS
36#include <NDEVR/PointMeasureModel.h>
37#include <NDEVR/CrossSectionModel.h>
38#include <NDEVR/CommandLockObject.h>
54 , e_measure_cross_section
55 , e_measurement_mode_size
63 MeasurementManager(DesignObjectLookup* manager);
64 ~MeasurementManager();
65 void createNewModel();
66 void addMeasurementPoint(
const Vertex<3, fltp08>& point);
67 virtual void cancel()
override;
68 const UUID& rootModelID()
const {
return m_root_model; }
69 const UUID& currentModel()
const {
return m_current_model; }
70 Model rootModel()
const;
74 void setGenerateNormals(
bool generate_normals);
75 void setAutoWind(
bool auto_wind_shapes);
76 void setRootModel(UUID model);
77 void setIsTouch(
bool touch_mode);
78 bool tryCommandLock();
79 bool hasCommandLock();
80 void lockMovement(
bool lock_movement) { m_lock_movement = lock_movement; }
81 bool movementLocked()
const {
return m_lock_movement; }
82 Buffer<UUID> measurementModelIDs()
const;
83 TranslatedString getHint()
const;
84 void finishCrossSection();
85 Buffer<PointMeasureModel> pointMeasurements()
const;
86 void setPointNamingFormat(
const TranslatedString& naming_format);
87 void setDistanceNamingFormat(
const TranslatedString& naming_format);
88 void setAngleNamingFormat(
const TranslatedString& naming_format);
89 void setPointType(
const BitFlag& point_types);
90 void setLineEdgeType(
const BitFlag& point_types);
91 void setMarkerScale(fltp08 thickness);
92 BitFlag pointType()
const {
return m_point_type; }
93 BitFlag lineEdgeType()
const {
return m_line_edge_type; }
94 Buffer<AngleMeasureModel> angleMeasurements()
const;
95 const TranslatedString& pointNamingFormat()
const {
return m_point_naming_format; }
96 const TranslatedString& distanceNamingFormat()
const {
return m_distance_naming_format; }
97 bool useLineLeader()
const {
return m_use_line_leader; }
98 bool usePointLeader()
const {
return m_use_point_leader; }
99 void setUsePointLeader(
bool use) { m_use_point_leader = use; }
100 void setUseLineLeader(
bool use) { m_use_line_leader = use; }
101 const TranslatedString& rootName()
const {
return m_root_name; }
102 void setRootName(
const TranslatedString& name);
103 void setCrossSectionSpacing(
const Vector<3, fltp08>& spacing);
104 Vector<3, fltp08> crossSectionSpacing()
const {
return m_cross_section_spacing; }
105 void setCrossSectionalCenterline(
bool centerline) { m_use_cross_sectional_centerline = centerline; };
106 bool crossSectionalCenterline()
const {
return m_use_cross_sectional_centerline; }
107 void setAngleMode(
const AngleMode& mode) { m_angle_mode = mode; }
108 AngleMode angleMode()
const {
return m_angle_mode; }
109 void setAutoSetLockPlane(
bool autoset_lock_plane);
110 virtual void finish()
override;
113 Resource<MeasureMode> measure_mode;
115 virtual void begin()
override;
117 void autoName(
const Model& model, uint04 index);
118 void calculateSolid(Geometry& mesh);
119 void createRootModel();
120 virtual SelectionInfo createSelectionInfo(
const MouseEvent& event, Camera* camera)
override;
121 void updatePrimitive(
const Vertex<3, fltp08>& world_location, Camera* camera);
122 void onSelect(Camera* camera);
123 static Vector<3, Angle<fltp08>> getOrientation(
const Vector<3, fltp08>& lookat,
const Vector<3, fltp08>& up);
124 virtual bool processMouseEvent(
const MouseEvent& mouse_event, DesignObjectLookup* lookup, Camera* camera)
override;
125 virtual bool processKeyEvent(
const KeyEvent& event, DesignObjectLookup* lookup, Camera* camera)
override;
126 void processResizeEvent(
const MeasureMode& spec, Model& model, Camera* camera);
128 void updateSnapIcon();
130 CommandLockObject m_command_lock;
131 PointMeasureModel m_point_model;
132 DistanceMeasureModel m_distance_measure_model;
133 #if NDEVR_CROSS_SECTION
134 CrossSectionModel m_cross_section_model;
136 AngleMeasureModel m_angle_measure_model;
137 AngleMode m_angle_mode = AngleMode::e_track_mouse;
138 TranslatedString m_point_naming_format;
139 TranslatedString m_distance_naming_format;
140 TranslatedString m_angle_naming_format;
141 TranslatedString m_root_name;
142 Plane<3, fltp08> m_draw_plane;
143 Vector<3, fltp08> m_cross_section_spacing;
144 UUID m_current_model;
149 bool m_auto_wind_shapes;
150 bool m_generate_normals;
151 bool m_lock_movement;
153 bool m_is_touch_mode;
154 bool m_use_line_leader;
155 bool m_use_point_leader;
156 bool m_use_cross_sectional_centerline;
157 bool m_autoset_lock_plane =
true;
159 template class NDEVR_DESIGN_API StringStream<MeasurementManager::MeasureMode>;
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80