OverlayNavigationCube.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Visualization
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, 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/OverlayItem.h"
17 #include "CeeCore/Vec3d.h"
18 #include "CeeCore/Str.h"
19 
20 namespace cee {
21 class Color3f;
22 class Image;
23 
24 namespace vis {
25 class Camera;
26 class View;
27 class Font;
28 
29 //==================================================================================================
30 //
31 //
32 //
33 //==================================================================================================
34 class CEE_VIS_EXPORT OverlayNavigationCube : public OverlayItem
35 {
36 public:
38  {
44  NCF_Z_NEG
45  };
46 
47 public:
48  OverlayNavigationCube(Camera* camera, Font* font);
49  virtual ~OverlayNavigationCube();
50 
51  virtual unsigned int width() const;
52  virtual unsigned int height() const;
53  void setSize(unsigned int width, unsigned int height);
54 
55  virtual int priority() const;
56  virtual void setPriority(int priority);
57 
58  void setFont(Font* font);
59 
60  Color3f textColor() const;
61  void setTextColor(const Color3f& color);
62 
63  bool updateHighlight(int winCoordX, int winCoordY, const View& view);
64  bool processSelection(int winCoordX, int winCoordY, const View& view, Vec3d* viewDir, Vec3d* up);
65 
66  void setHome(const Vec3d& viewDirection, const Vec3d& up);
67  void setAxisLabels(const Str& xLabel, const Str& yLabel, const Str& zLabel);
68  void setAxisArrowColors(const Color3f& xAxisColor, const Color3f& yAxisColor, const Color3f& zAxisColor);
69  void setFaceTexture(NavCubeFace face, const Image& texture);
70 
71 private:
72  virtual cvf::OverlayItem* internal_cvfOverlayItem();
73 
74 private:
75  CEE_PRIVATE_IMPL(OverlayNavigationCube);
76  CEE_DISALLOW_COPY_AND_ASSIGN(OverlayNavigationCube);
77 };
78 
79 } // namespace vis
80 } // namespace cee
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
The camera configuration of a view.
Definition: Camera.h:33
Overlay navigation cube used for navigation and orientation in a View.
Definition: OverlayNavigationCube.h:34
NavCubeFace
Enumerator for each of the navigation cube six faces.
Definition: OverlayNavigationCube.h:37
Positive X navigation cube face.
Definition: OverlayNavigationCube.h:39
A general unicode based string class.
Definition: Str.h:28
Abstract interface for overlay items.
Definition: OverlayItem.h:31
Negative X navigation cube face.
Definition: OverlayNavigationCube.h:40
Class for storing an RGB color triplet.
Definition: Color3f.h:25
Positive Z navigation cube face.
Definition: OverlayNavigationCube.h:43
Provides a render area in the user control/widget to enable visualization of the current model data a...
Definition: View.h:40
Positive Y navigation cube face.
Definition: OverlayNavigationCube.h:41
Vector class for a 3D double vector.
Definition: Vec3d.h:26
Negative Y navigation cube face.
Definition: OverlayNavigationCube.h:42
A font used for text drawing.
Definition: Font.h:30