Plots.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: App
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 "CeeApp/Base.h"
16 #include "CeeCore/Base.h"
17 #include "CeeCore/PtrRef.h"
18 #include "CeeCore/RefCountedObject.h"
19 #include "CeeUnstructGrid/HitItem.h"
20 #include "CeeVisualization/View.h"
21 #include "CeePlot2d/OverlayPlot.h"
22 
23 #include <map>
24 
25 namespace cee {
26 namespace ug {
27 
28 class UnstructGridModel;
29 
30 }
31 }
32 
33 namespace cee {
34 namespace app {
35 
36 //==================================================================================================
37 //
38 // Class for Plot management
39 //
40 //==================================================================================================
41 class CEE_APP_EXPORT Plots : public RefCountedObject
42 {
43 
44 public:
45  static Plots* instance();
46 
47  size_t count() const;
48 
49  size_t index(cee::plt::OverlayPlot* plot);
50  cee::plt::OverlayPlot* get(size_t index);
51  cee::plt::OverlayPlot* add();
52  cee::plt::Curve* addHistoryCurve(size_t plotIndex, const cee::ug::HitItem& hitItem, const cee::ug::UnstructGridModel* model, int scalarId);
53  cee::plt::Curve* addLengthCurve(size_t plotIndex, const cee::ug::UnstructGridModel* model, std::vector<cee::Vec3d>* pathPoints = NULL);
54 
55  bool remove(size_t index);
56  void removeAll();
57 
58 private:
59  Plots();
60  virtual ~Plots();
61 
62 
63  CEE_PRIVATE_IMPL(Plots);
64  CEE_DISALLOW_COPY_AND_ASSIGN(Plots);
65 
66 };
67 
68 } // namespace cee
69 } // namespace app
Class to manage the list of Plots in the application.
Definition: Plots.h:41
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
Overlay item with basic 2D plotting.
Definition: OverlayPlot.h:38
UnstructGridModel is a subclass of Model which adds specific model structure and functionality for re...
Definition: UnstructGridModel.h:72
A 2D data series for use in an OverlayPlot.
Definition: Curve.h:32
Small class containing the data for a hit of an intersection between a ray and a part in an UnstructG...
Definition: HitItem.h:26