33#include <NDEVR/SnapController.h>
35#include <NDEVR/CommandLockObject.h>
46 enum GeometryCreateMode :
uint04
66 enum GeometrySpecMode :
uint04
78 Vertex<3, fltp08> center = Constant<Vector<3, fltp08>>::Invalid;
79 Ray<3, fltp08> normal = Constant<Vector<3, fltp08>>::Invalid;
80 Vertex<3, fltp08> edge[4] = { Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid };
81 Vertex<3, fltp08> corner[4] = { Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid };
82 Vertex<3, fltp08> plane[4] = { Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid, Constant<Vector<3, fltp08>>::Invalid };
86 GeometryMaker(DesignObjectLookup* manager);
88 virtual void begin()
override;
89 void createNewModel();
90 virtual void finish()
override;
91 virtual void cancel()
override;
93 const UUID& material()
const {
return m_default_material; }
94 const UUID& rootModel()
const {
return m_root_model; }
95 const UUID& currentModel()
const {
return m_current_model; }
96 void deleteAllCreatedModels();
97 void setGenerateNormals(
bool generate_normals);
98 void setAutoWind(
bool auto_wind_shapes);
99 void setRootModel(UUID model, UUID material = Constant<UUID>::Invalid);
100 void setIsTouch(
bool touch_mode);
101 bool tryCommandLock();
102 bool hasCommandLock();
103 void calculateSolid(Geometry& mesh);
104 virtual void addPoint(
const SnapPoint& point)
override;
105 void lockMovement(
bool lock_movement) { m_lock_movement = lock_movement; }
106 bool movementLocked()
const {
return m_lock_movement; }
107 uint04 currentStep()
const;
108 uint04 numberOfSteps()
const;
109 const Buffer<UUID>& createdModels() {
return m_created_models; }
110 void setSpecMode(
const Buffer<GeometrySpecMode>& spec_mode) { m_spec_mode = spec_mode; };
111 const Buffer<GeometrySpecMode>& specMode() {
return m_spec_mode; }
112 TranslatedString getHint()
const;
113 virtual void updateLocation(
const Vertex<3, fltp08>& location,
bool is_select, Camera* camera)
override;
114 Resource<GeometryCreateMode> create_mode;
116 void createRootModel();
117 virtual SelectionInfo createSelectionInfo(
const MouseEvent& event, Camera* camera)
override;
118 void updatePrimitive(
const Vertex<3, fltp08>& world_location);
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 GeoStructure& spec, Model& model, Camera* camera);
124 void setupDefaultMaterial();
126 CommandLockObject m_command_lock;
127 Plane<3, fltp08> m_draw_plane;
128 UUID m_default_material;
129 UUID m_current_model;
131 uint04 m_num_created[e_create_mode_size] = { 0,0,0,0,0,0,0,0,0,0,0,0,0 };
132 uint04 m_num_roots_created = 0;
133 Buffer<UUID> m_created_models;
134 Buffer<GeometrySpecMode> m_spec_mode;
135 bool m_auto_wind_shapes;
136 bool m_generate_normals;
137 bool m_lock_movement;
139 bool m_is_touch_mode;
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:94