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>
51 , e_measure_cross_section
52 , e_measurement_mode_size
60 MeasurementManager(DesignObjectLookup* manager);
61 ~MeasurementManager();
62 void createNewModel();
63 void addMeasurementPoint(
const Vertex<3, fltp08>& point);
64 virtual void cancel()
override;
65 const UUID& rootModelID()
const {
return m_root_model; }
66 const UUID& currentModel()
const {
return m_current_model; }
67 Model rootModel()
const;
71 void setGenerateNormals(
bool generate_normals);
72 void setAutoWind(
bool auto_wind_shapes);
73 void setRootModel(UUID model);
74 void setIsTouch(
bool touch_mode);
75 bool tryCommandLock();
76 bool hasCommandLock();
77 void lockMovement(
bool lock_movement) { m_lock_movement = lock_movement; }
78 bool movementLocked()
const {
return m_lock_movement; }
79 Buffer<UUID> measurementModelIDs()
const;
80 TranslatedString getHint()
const;
81 void finishCrossSection();
82 Buffer<PointMeasureModel> pointMeasurements()
const;
83 void setPointNamingFormat(
const TranslatedString& naming_format);
84 void setDistanceNamingFormat(
const TranslatedString& naming_format);
85 void setAngleNamingFormat(
const TranslatedString& naming_format);
86 void setPointType(
const BitFlag& point_types);
87 void setLineEdgeType(
const BitFlag& point_types);
88 void setMarkerScale(fltp08 thickness);
89 BitFlag pointType()
const {
return m_point_type; }
90 BitFlag lineEdgeType()
const {
return m_line_edge_type; }
91 Buffer<AngleMeasureModel> angleMeasurements()
const;
92 const TranslatedString& pointNamingFormat()
const {
return m_point_naming_format; }
93 const TranslatedString& distanceNamingFormat()
const {
return m_distance_naming_format; }
94 bool useLineLeader()
const {
return m_use_line_leader; }
95 bool usePointLeader()
const {
return m_use_point_leader; }
96 void setUsePointLeader(
bool use) { m_use_point_leader = use; }
97 void setUseLineLeader(
bool use) { m_use_line_leader = use; }
98 const TranslatedString& rootName()
const {
return m_root_name; }
99 void setRootName(
const TranslatedString& name);
100 void setCrossSectionSpacing(
const Vector<3, fltp08>& spacing);
101 Vector<3, fltp08> crossSectionSpacing()
const {
return m_cross_section_spacing; }
102 void setCrossSectionalCenterline(
bool centerline) { m_use_cross_sectional_centerline = centerline; };
103 bool crossSectionalCenterline()
const {
return m_use_cross_sectional_centerline; }
104 void setAngleMode(
const AngleMode& mode) { m_angle_mode = mode; }
105 AngleMode angleMode()
const {
return m_angle_mode; }
106 void setAutoSetLockPlane(
bool autoset_lock_plane);
107 virtual void finish()
override;
110 Resource<MeasureMode> measure_mode;
112 virtual void begin()
override;
114 void autoName(
const Model& model, uint04 index);
115 void calculateSolid(Geometry& mesh);
116 void createRootModel();
117 virtual SelectionInfo createSelectionInfo(
const MouseEvent& event, Camera* camera)
override;
118 void updatePrimitive(
const Vertex<3, fltp08>& world_location, Camera* camera);
119 void onSelect(Camera* camera);
120 static Vector<3, Angle<fltp08>> getOrientation(
const Vector<3, fltp08>& lookat,
const Vector<3, fltp08>& up);
121 virtual bool processMouseEvent(
const MouseEvent& mouse_event, DesignObjectLookup* lookup, Camera* camera)
override;
122 virtual bool processKeyEvent(
const KeyEvent& event, DesignObjectLookup* lookup, Camera* camera)
override;
123 void processResizeEvent(
const MeasureMode& spec, Model& model, Camera* camera);
125 void updateSnapIcon();
127 CommandLockObject m_command_lock;
128 PointMeasureModel m_point_model;
129 DistanceMeasureModel m_distance_measure_model;
130 #if NDEVR_CROSS_SECTION
131 CrossSectionModel m_cross_section_model;
133 AngleMeasureModel m_angle_measure_model;
134 AngleMode m_angle_mode = AngleMode::e_track_mouse;
135 TranslatedString m_point_naming_format;
136 TranslatedString m_distance_naming_format;
137 TranslatedString m_angle_naming_format;
138 TranslatedString m_root_name;
139 Plane<3, fltp08> m_draw_plane;
140 Vector<3, fltp08> m_cross_section_spacing;
141 UUID m_current_model;
146 bool m_auto_wind_shapes;
147 bool m_generate_normals;
148 bool m_lock_movement;
150 bool m_is_touch_mode;
151 bool m_use_line_leader;
152 bool m_use_point_leader;
153 bool m_use_cross_sectional_centerline;
154 bool m_autoset_lock_plane =
true;
156 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:98