annotate Applications/Samples/SimpleViewerApplication.h @ 274:dc1beee33134 am-2

split SdlApplication into NativeApplication and SdlApplication
author am@osimis.io
date Fri, 24 Aug 2018 13:52:55 +0200
parents f21ba2468570
children 8f5d7495076d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
1 /**
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
2 * Stone of Orthanc
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
6 *
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
10 * the License, or (at your option) any later version.
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
11 *
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
15 * Affero General Public License for more details.
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
16 *
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
19 **/
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
20
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
21
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
22 #pragma once
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
23
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
24 #include "SampleApplicationBase.h"
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
25
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
26 #include "../../Framework/Layers/OrthancFrameLayerSource.h"
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
27 #include "../../Framework/Widgets/LayerWidget.h"
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
28 #include "../../Framework/Widgets/LayoutWidget.h"
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 249
diff changeset
29 #include "../../Framework/Messages/IObserver.h"
258
e5a9b3d03478 first very basic version of SmartLoader
am@osimis.io
parents: 257
diff changeset
30 #include "../../Framework/SmartLoader.h"
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
31
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
32 #include <Core/Logging.h>
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
33
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
34 namespace OrthancStone
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
35 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
36 namespace Samples
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
37 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
38 class SimpleViewerApplication :
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
39 public SampleApplicationBase,
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 249
diff changeset
40 public IObserver
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
41 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
42 private:
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
43 class ThumbnailInteractor : public IWorldSceneInteractor
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
44 {
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
45 private:
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
46 SimpleViewerApplication& application_;
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
47 public:
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
48 ThumbnailInteractor(SimpleViewerApplication& application) :
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
49 application_(application)
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
50 {
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
51 }
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
52
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
53 virtual IWorldSceneMouseTracker* CreateMouseTracker(WorldSceneWidget& widget,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
54 const ViewportGeometry& view,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
55 MouseButton button,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
56 double x,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
57 double y,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
58 IStatusBar* statusBar)
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
59 {
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
60 if (button == MouseButton_Left)
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
61 {
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
62 statusBar->SetMessage("trying to drag the thumbnail from " + widget.GetName());
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
63 }
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
64 return NULL;
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
65 }
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
66 virtual void MouseOver(CairoContext& context,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
67 WorldSceneWidget& widget,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
68 const ViewportGeometry& view,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
69 double x,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
70 double y,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
71 IStatusBar* statusBar)
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
72 {}
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
73
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
74 virtual void MouseWheel(WorldSceneWidget& widget,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
75 MouseWheelDirection direction,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
76 KeyboardModifiers modifiers,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
77 IStatusBar* statusBar)
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
78 {}
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
79
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
80 virtual void KeyPressed(WorldSceneWidget& widget,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
81 char key,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
82 KeyboardModifiers modifiers,
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
83 IStatusBar* statusBar)
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
84 {};
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
85
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
86 };
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
87
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
88 class Interactor : public IWorldSceneInteractor
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
89 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
90 private:
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
91 SimpleViewerApplication& application_;
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
92
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
93 public:
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
94 Interactor(SimpleViewerApplication& application) :
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
95 application_(application)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
96 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
97 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
98
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
99 virtual IWorldSceneMouseTracker* CreateMouseTracker(WorldSceneWidget& widget,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
100 const ViewportGeometry& view,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
101 MouseButton button,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
102 double x,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
103 double y,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
104 IStatusBar* statusBar)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
105 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
106 return NULL;
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
107 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
108
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
109 virtual void MouseOver(CairoContext& context,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
110 WorldSceneWidget& widget,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
111 const ViewportGeometry& view,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
112 double x,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
113 double y,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
114 IStatusBar* statusBar)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
115 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
116 if (statusBar != NULL)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
117 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
118 Vector p = dynamic_cast<LayerWidget&>(widget).GetSlice().MapSliceToWorldCoordinates(x, y);
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
119
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
120 char buf[64];
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
121 sprintf(buf, "X = %.02f Y = %.02f Z = %.02f (in cm)",
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
122 p[0] / 10.0, p[1] / 10.0, p[2] / 10.0);
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
123 statusBar->SetMessage(buf);
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
124 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
125 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
126
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
127 virtual void MouseWheel(WorldSceneWidget& widget,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
128 MouseWheelDirection direction,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
129 KeyboardModifiers modifiers,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
130 IStatusBar* statusBar)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
131 {
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
132 // int scale = (modifiers & KeyboardModifiers_Control ? 10 : 1);
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
133
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
134 // switch (direction)
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
135 // {
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
136 // case MouseWheelDirection_Up:
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
137 // application_.OffsetSlice(-scale);
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
138 // break;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
139
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
140 // case MouseWheelDirection_Down:
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
141 // application_.OffsetSlice(scale);
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
142 // break;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
143
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
144 // default:
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
145 // break;
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
146 // }
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
147 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
148
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
149 virtual void KeyPressed(WorldSceneWidget& widget,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
150 char key,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
151 KeyboardModifiers modifiers,
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
152 IStatusBar* statusBar)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
153 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
154 switch (key)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
155 {
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
156 case 's':
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
157 widget.SetDefaultView();
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
158 break;
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
159 case 'n':
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
160 application_.NextImage(widget);
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
161 break;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
162
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
163 default:
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
164 break;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
165 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
166 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
167 };
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
168
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
169
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
170 std::unique_ptr<Interactor> interactor_;
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
171 std::unique_ptr<ThumbnailInteractor> thumbnailInteractor_;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
172 LayoutWidget* mainLayout_;
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
173 LayoutWidget* thumbnailsLayout_;
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
174 LayerWidget* mainWidget_;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
175 std::vector<LayerWidget*> thumbnails_;
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
176 std::vector<std::string> instances_;
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
177
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
178 unsigned int currentInstanceIndex_;
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
179 OrthancStone::WidgetViewport* wasmViewport1_;
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
180 OrthancStone::WidgetViewport* wasmViewport2_;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
181
254
abc1c6231947 cleanup
am@osimis.io
parents: 253
diff changeset
182 IStatusBar* statusBar_;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
183 unsigned int slice_;
258
e5a9b3d03478 first very basic version of SmartLoader
am@osimis.io
parents: 257
diff changeset
184 std::unique_ptr<SmartLoader> smartLoader_;
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
185 std::unique_ptr<OrthancApiClient> orthancApiClient_;
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 249
diff changeset
186
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
187 public:
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 249
diff changeset
188 SimpleViewerApplication(MessageBroker& broker) :
258
e5a9b3d03478 first very basic version of SmartLoader
am@osimis.io
parents: 257
diff changeset
189 IObserver(broker),
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
190 mainLayout_(NULL),
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
191 currentInstanceIndex_(0),
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
192 wasmViewport1_(NULL),
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 249
diff changeset
193 wasmViewport2_(NULL),
258
e5a9b3d03478 first very basic version of SmartLoader
am@osimis.io
parents: 257
diff changeset
194 slice_(0)
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
195 {
267
89d02de83c03 added declaretion of messages handled/emitted
am@osimis.io
parents: 266
diff changeset
196 DeclareIgnoredMessage(MessageType_Widget_ContentChanged);
89d02de83c03 added declaretion of messages handled/emitted
am@osimis.io
parents: 266
diff changeset
197 DeclareHandledMessage(MessageType_Widget_GeometryChanged);
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
198
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
199 DeclareHandledMessage(MessageType_OrthancApi_GetStudyIds_Ready);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
200 DeclareHandledMessage(MessageType_OrthancApi_GetStudy_Ready);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
201 DeclareHandledMessage(MessageType_OrthancApi_GetSeries_Ready);
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
202 }
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 249
diff changeset
203
237
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents: 235
diff changeset
204 virtual void Finalize() {}
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents: 235
diff changeset
205 virtual IWidget* GetCentralWidget() {return mainLayout_;}
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents: 235
diff changeset
206
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
207 virtual void DeclareStartupOptions(boost::program_options::options_description& options)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
208 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
209 boost::program_options::options_description generic("Sample options");
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
210 generic.add_options()
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
211 ("studyId", boost::program_options::value<std::string>(),
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
212 "Orthanc ID of the study")
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
213 ;
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
214
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
215 options.add(generic);
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
216 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
217
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
218 virtual void Initialize(BasicApplicationContext* context,
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
219 IStatusBar& statusBar,
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
220 const boost::program_options::variables_map& parameters)
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
221 {
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
222 using namespace OrthancStone;
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
223
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
224 context_ = context;
254
abc1c6231947 cleanup
am@osimis.io
parents: 253
diff changeset
225 statusBar_ = &statusBar;
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
226
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
227 {// initialize viewports and layout
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
228 mainLayout_ = new LayoutWidget("main-layout");
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
229 mainLayout_->SetPadding(10);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
230 mainLayout_->SetBackgroundCleared(true);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
231 mainLayout_->SetBackgroundColor(0, 0, 0);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
232 mainLayout_->SetHorizontal();
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
233
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
234 thumbnailsLayout_ = new LayoutWidget("thumbnail-layout");
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
235 thumbnailsLayout_->SetPadding(10);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
236 thumbnailsLayout_->SetBackgroundCleared(true);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
237 thumbnailsLayout_->SetBackgroundColor(50, 50, 50);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
238 thumbnailsLayout_->SetVertical();
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
239
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
240 mainWidget_ = new LayerWidget(broker_, "main-viewport");
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
241 mainWidget_->RegisterObserver(*this);
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
242
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
243 // hierarchy
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
244 mainLayout_->AddWidget(thumbnailsLayout_);
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
245 mainLayout_->AddWidget(mainWidget_);
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
246
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
247 // sources
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
248 smartLoader_.reset(new SmartLoader(broker_, context_->GetWebService()));
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
249 smartLoader_->SetImageQuality(SliceImageQuality_FullPam);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
250
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
251 mainLayout_->SetTransmitMouseOver(true);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
252 interactor_.reset(new Interactor(*this));
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
253 mainWidget_->SetInteractor(*interactor_);
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
254 thumbnailInteractor_.reset(new ThumbnailInteractor(*this));
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
255 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
256
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
257 statusBar.SetMessage("Use the key \"s\" to reinitialize the layout");
254
abc1c6231947 cleanup
am@osimis.io
parents: 253
diff changeset
258 statusBar.SetMessage("Use the key \"n\" to go to next image in the main viewport");
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
259
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
260 orthancApiClient_.reset(new OrthancApiClient(broker_, context_->GetWebService()));
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
261
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
262 if (parameters.count("studyId") < 1)
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
263 {
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
264 LOG(WARNING) << "The study ID is missing, will take the first studyId found in Orthanc";
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
265 orthancApiClient_->ScheduleGetStudyIds(*this);
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
266 }
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
267 else
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
268 {
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
269 SelectStudy(parameters["studyId"].as<std::string>());
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
270 }
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
271 }
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
272
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
273 void OnStudyListReceived(const Json::Value& response)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
274 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
275 if (response.isArray() && response.size() > 1)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
276 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
277 SelectStudy(response[0].asString());
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
278 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
279 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
280 void OnStudyReceived(const Json::Value& response)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
281 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
282 if (response.isObject() && response["Series"].isArray())
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
283 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
284 for (size_t i=0; i < response["Series"].size(); i++)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
285 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
286 orthancApiClient_->ScheduleGetSeries(*this, response["Series"][(int)i].asString());
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
287 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
288 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
289 }
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
290
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
291 void OnSeriesReceived(const Json::Value& response)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
292 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
293 if (response.isObject() && response["Instances"].isArray() && response["Instances"].size() > 0)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
294 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
295 LoadThumbnailForSeries(response["ID"].asString(), response["Instances"][0].asString());
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
296 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
297 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
298
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
299 void LoadThumbnailForSeries(const std::string& seriesId, const std::string& instanceId)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
300 {
271
46c5296d867e OracleWebService and BasicSdlApplicationContext using the same global mutex
am@osimis.io
parents: 270
diff changeset
301 LOG(INFO) << "Loading thumbnail for series " << seriesId;
46c5296d867e OracleWebService and BasicSdlApplicationContext using the same global mutex
am@osimis.io
parents: 270
diff changeset
302 LayerWidget* thumbnailWidget = new LayerWidget(broker_, "thumbnail-series-" + seriesId);
46c5296d867e OracleWebService and BasicSdlApplicationContext using the same global mutex
am@osimis.io
parents: 270
diff changeset
303 thumbnails_.push_back(thumbnailWidget);
46c5296d867e OracleWebService and BasicSdlApplicationContext using the same global mutex
am@osimis.io
parents: 270
diff changeset
304 thumbnailsLayout_->AddWidget(thumbnailWidget);
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
305 thumbnailWidget->RegisterObserver(*this);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
306 thumbnailWidget->AddLayer(smartLoader_->GetFrame(instanceId, 0));
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
307 //thumbnailWidget->SetInteractor(*thumbnailInteractor_);
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
308 }
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
309
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
310 void SelectStudy(const std::string& studyId)
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
311 {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
312 orthancApiClient_->ScheduleGetStudy(*this, studyId);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
313 }
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
314
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
315 virtual void HandleMessage(IObservable& from, const IMessage& message) {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
316 switch (message.GetType()) {
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
317 case MessageType_Widget_GeometryChanged:
271
46c5296d867e OracleWebService and BasicSdlApplicationContext using the same global mutex
am@osimis.io
parents: 270
diff changeset
318 LOG(INFO) << "Widget geometry ready: " << dynamic_cast<LayerWidget&>(from).GetName();
270
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
319 dynamic_cast<LayerWidget&>(from).SetDefaultView();
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
320 break;
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
321 case MessageType_OrthancApi_GetStudyIds_Ready:
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
322 OnStudyListReceived(dynamic_cast<const OrthancApiClient::GetJsonResponseReadyMessage&>(message).response_);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
323 break;
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
324 case MessageType_OrthancApi_GetSeries_Ready:
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
325 OnSeriesReceived(dynamic_cast<const OrthancApiClient::GetJsonResponseReadyMessage&>(message).response_);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
326 break;
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
327 case MessageType_OrthancApi_GetStudy_Ready:
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
328 OnStudyReceived(dynamic_cast<const OrthancApiClient::GetJsonResponseReadyMessage&>(message).response_);
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
329 break;
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
330 default:
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
331 VLOG("unhandled message type" << message.GetType());
2d64f4d39610 backup (work in progress)
am@osimis.io
parents: 268
diff changeset
332 }
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
333 }
237
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents: 235
diff changeset
334
274
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents: 273
diff changeset
335 #if ORTHANC_ENABLE_WASM==1
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
336 virtual void InitializeWasm() {
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
337
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
338 AttachWidgetToWasmViewport("canvas", thumbnailsLayout_);
274
dc1beee33134 split SdlApplication into NativeApplication and SdlApplication
am@osimis.io
parents: 273
diff changeset
339 AttachWidgetToWasmViewport("canvas2", mainWidget_);
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents: 237
diff changeset
340 }
237
b4642964c355 SimpleViewer demo running both with SDL and Wasm
am@osimis.io
parents: 235
diff changeset
341 #endif
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
342
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
343 void NextImage(WorldSceneWidget& widget) {
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
344 assert(context_);
254
abc1c6231947 cleanup
am@osimis.io
parents: 253
diff changeset
345 statusBar_->SetMessage("displaying next image");
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
346
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
347 currentInstanceIndex_ = (currentInstanceIndex_ + 1) % instances_.size();
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
348
273
f21ba2468570 force all Widgets to have a name to ease debugging
am@osimis.io
parents: 271
diff changeset
349 mainWidget_->ReplaceLayer(0, smartLoader_->GetFrame(instances_[currentInstanceIndex_], 0));
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
350
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
351 }
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
352 };
249
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
353
54c7284b0eff merged useful changes from branch am
am@osimis.io
parents: 245
diff changeset
354
235
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
355 }
ce4405d98b92 Added SimpleViewerApplication (working in SDL)
am@osimis.io
parents:
diff changeset
356 }