33#include <NDEVR/SelectionArea.h>
34#include <NDEVR/SnapController.h>
41 , e_vertex_rectangle_selection
42 , e_vertex_polygon_selection
44 , e_sub_selection_size
49 explicit SelectionController(DesignObjectLookup* manager);
50 virtual ~SelectionController(){}
51 virtual void begin()
override;
52 virtual void finish()
override;
53 virtual void cancel()
override;
54 bool isInvertedSelection()
const;
55 void setInvertedSelection(
bool is_inside);
56 void setSubSelectionMode(
const SubSelectionMode& mode);
57 uint04 addMask(
const SelectionArea<3, fltp08>& mask);
59 void setThemeCameraBackgroundColor(
const RGBColor& color);
60 void updateCameraBackgrounds();
61 void setCameraShowGrid(
bool show_grid);
62 void setCameraShowEnvironment(
bool show_grid);
63 void removeMask(uint04 mask_index);
64 void highlightMask(uint04 mask_index);
65 void clearMaskHighlight();
67 const Buffer<SelectionArea<3, fltp08>>& masks()
const;
68 void setMaskEnabled(uint04 index,
bool enabled);
70 void updateSelectionInfo();
71 SubSelectionMode subSelectionMode()
const {
return m_sub_selection_mode;}
72 TranslatedString defaultHint(
const TranslatedString& action_hint)
const;
73 String currentSelectionHint()
const;
74 virtual bool processMouseEvent(
const MouseEvent& mouse_event, DesignObjectLookup* lookup, Camera* camera)
override;
75 virtual bool processKeyEvent(
const KeyEvent& event, DesignObjectLookup* lookup, Camera* camera)
override;
77 bool selectionComplete()
const {
return m_selection_complete;}
78 UUID currentSelection()
const;
79 void clear(
bool clear_selection,
bool clear_masks);
80 void setHideMaskExclusion(
bool is_hidden);
81 bool darkensMaskExclusion()
const {
return m_darken_mask_exclusion; }
82 void darkenMaskExclusion(
bool darken);
84 void setPreModelFilter(
const std::function<
bool(
const Model&)>& pre_model_filter);
85 void setPreGeometryFilter(
const std::function<
bool(
const Model&,
const Geometry&)>& pre_geometry_filter);
86 void setSelectionFilter(
const std::function<
bool(
const Model&)>& selection_filter);
87 void setIsEditSelection(
bool is_edit_selection);
89 void setSelectionMaskInfo(
const SelectionInfo& info);
90 void updateSelectionMask();
91 void clearSelection();
94 UUID m_current_selection;
95 SelectionInfo m_selection_info;
96 SelectionInfo m_selection_mask_info;
97 SelectionInfo m_selection_highlight_info;
98 SubSelectionMode m_sub_selection_mode;
99 Buffer<UUID> m_last_mask_geometries;
100 Buffer<UUID> m_last_selection_geometries;
101 bool m_inverted_selection;
102 bool m_temp_inverted;
103 bool m_selection_complete;
104 bool m_is_edit_selection;
105 bool m_hide_mask_exclusion;
106 bool m_darken_mask_exclusion;
107 uint04 m_highlighted_mask;
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120