BoxLocator.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2017, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVisualization/Base.h"
16 #include "CeeVisualization/MouseEvent.h"
17 #include "CeeVisualization/MarkupModel.h"
18 
19 #include "CeeCore/RefCountedObject.h"
20 #include "CeeCore/Plane.h"
21 
22 namespace cee {
23 class Vec3d;
24 class Color3f;
25 
26 namespace vis {
27 
28 //==================================================================================================
29 //
30 //
31 //
32 //==================================================================================================
33 class CEE_VIS_EXPORT BoxLocator : public MarkupModel
34 {
35 public:
36  BoxLocator(View* view);
37 
38  virtual ~BoxLocator();
39 
40  void setup(const Vec3d& min, const Vec3d& max);
41 
42  void tiltAlongAxis();
43 
44  void setBoxColor(const Color3f& color);
45  Color3f boxColor() const;
46 
47  void setBoxOpacity(float opacity);
48  float boxOpacity() const;
49 
50  void setSphereColor(const Color3f& color);
51  Color3f sphereColor() const;
52 
53  void setSelectedColor(const Color3f& color);
54  Color3f selectedColor();
55 
56  std::vector<Plane> planes() const;
57  Vec3d centerPosition() const;
58 
59  void boxNavigationOnMousePressEvent(MouseEvent* mouseEvent, const Vec3d& rotationPoint);
60  void boxNavigationOnMouseMoveEvent(MouseEvent* mouseEvent);
61  void boxNavigationOnMouseReleaseEvent(MouseEvent* mouseEvent);
62 
63  bool onMousePressEvent(MouseEvent* mouseEvent);
64  bool onMouseMoveEvent(MouseEvent* mouseEvent);
65  void onMouseReleaseEvent();
66 
67 
68 private:
69  CEE_PRIVATE_IMPL(BoxLocator);
70  CEE_DISALLOW_COPY_AND_ASSIGN(BoxLocator);
71 };
72 
73 } // namespace vis
74 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
A locator designed to position a box.
Definition: BoxLocator.h:33
Model used for drawing labels, arrows, lines, points, triangles and glyphs.
Definition: MarkupModel.h:31
Mouse event.
Definition: MouseEvent.h:47
Class for storing an RGB color triplet.
Definition: Color3f.h:25
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40
Vector class for a 3D double vector.
Definition: Vec3d.h:26