openscenegraph
osgViewer/ViewerEventHandlers
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2*
3* This library is open source and may be redistributed and/or modified under
4* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5* (at your option) any later version. The full license is in LICENSE file
6* included with this distribution, and on the openscenegraph.org website.
7*
8* This library is distributed in the hope that it will be useful,
9* but WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* OpenSceneGraph Public License for more details.
12*/
13
14#ifndef OSGVIEWER_VIEWEREVENTHANDLERS
15#define OSGVIEWER_VIEWEREVENTHANDLERS 1
16
17#include <osg/AnimationPath>
18#include <osgText/Text>
19#include <osgGA/GUIEventHandler>
21
23#include <osgViewer/Viewer>
24
25#include <osgDB/fstream>
26
27namespace osgViewer {
28
70
75{
76 public:
77
79
89
92
95
96 double getBlockMultiplier() const { return _blockMultiplier; }
97
98 void reset();
99
100 osg::Camera* getCamera() { return _camera.get(); }
101 const osg::Camera* getCamera() const { return _camera.get(); }
102
104
106
108 virtual void getUsage(osg::ApplicationUsage& usage) const;
109
142 void addUserStatsLine(const std::string& label, const osg::Vec4& textColor, const osg::Vec4& barColor,
143 const std::string& timeTakenName, float multiplier, bool average, bool averageInInverseSpace,
144 const std::string& beginTimeName, const std::string& endTimeName, float maxValue);
145
146 void removeUserStatsLine(const std::string& label);
147
148protected:
149
151 void setWindowSize(int width, int height);
152
153 osg::Geometry* createBackgroundRectangle(const osg::Vec3& pos, const float width, const float height, osg::Vec4& color);
154
155 osg::Geometry* createGeometry(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numBlocks);
156
157 osg::Geometry* createFrameMarkers(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numBlocks);
158
159 osg::Geometry* createTick(const osg::Vec3& pos, float height, const osg::Vec4& colour, unsigned int numTicks);
160
161 void createTimeStatsLine(const std::string& lineLabel, osg::Vec3 pos,
162 const osg::Vec4& textColor, const osg::Vec4& barColor, osg::Stats* viewerStats, osg::Stats* stats,
163 const std::string& timeTakenName, float multiplier, bool average, bool averageInInverseSpace,
164 const std::string& beginTimeName, const std::string& endTimeName);
165
166 void createCameraTimeStats(osg::Vec3& pos, bool acquireGPUStats, osg::Stats* viewerStats, osg::Camera* camera);
167
169
171
174
176
179
181
183
186
187 unsigned int _frameRateChildNum;
188 unsigned int _viewerChildNum;
191 unsigned int _numBlocks;
193
196
197 std::string _font;
199 float _leftPos;
202
204 {
205 std::string label;
208 std::string timeTakenName;
212 std::string beginTimeName;
213 std::string endTimeName;
214 float maxValue;
215
216 UserStatsLine(const std::string& label_, const osg::Vec4& textColor_, const osg::Vec4& barColor_,
217 const std::string& timeTakenName_, float multiplier_, bool average_, bool averageInInverseSpace_,
218 const std::string& beginTimeName_, const std::string& endTimeName_, float maxValue_)
219 : label(label_), textColor(textColor_), barColor(barColor_),
220 timeTakenName(timeTakenName_), multiplier(multiplier_), average(average_), averageInInverseSpace(averageInInverseSpace_),
221 beginTimeName(beginTimeName_), endTimeName(endTimeName_), maxValue(maxValue_)
222 {
223 }
224 };
225
226 typedef std::vector<UserStatsLine> UserStatsLines;
228
229};
230
233{
234public:
235
237
239 virtual void getUsage(osg::ApplicationUsage &usage) const;
240
243
244 void setToggleFullscreen(bool flag) { _toggleFullscreen = flag; }
245 bool getToggleFullscreen() const { return _toggleFullscreen; }
246
251
254
256
257protected:
258
261
262 unsigned int getNearestResolution(int screenWidth, int screenHeight, int width, int height) const;
263
266
270 std::vector<osg::Vec2> _resolutionList;
272};
273
308
354
381
404
405
408{
409 public:
410
413 {
414 public:
415 virtual void operator()(const osg::Image& image, const unsigned int context_id) = 0;
416 };
417
420 {
421 public:
423 {
426 // ... any others?
427 };
428
429 WriteToFile(const std::string& filename, const std::string& extension, SavePolicy savePolicy = SEQUENTIAL_NUMBER);
430
431 virtual void operator()(const osg::Image& image, const unsigned int context_id);
432
433 void setSavePolicy(SavePolicy savePolicy) { _savePolicy = savePolicy; }
435
436 protected:
437
438 WriteToFile& operator = (const WriteToFile&) { return *this; }
439
440 const std::string _filename;
441 const std::string _extension;
442
444
445 std::vector<unsigned int> _contextSaveCounter;
446 };
447
450 ScreenCaptureHandler(CaptureOperation* defaultOperation = 0, int numFrames = 1);
451
454
457
460
461 // aa will point to an osgViewer::View, so we will take a screenshot
462 // of that view's graphics contexts.
464
467
470 void setFramesToCapture(int numFrames);
471
474
478
481
483 virtual void getUsage(osg::ApplicationUsage& usage) const;
484
485 protected:
488
491 // there could be a key to start taking screenshots every new frame
492
495
499};
500
505{
506public:
507
512
514
517
520
523
526
527 // use the osgGA::GUIEventHandler implementation of run.
528 virtual bool run(osg::Object* object, osg::Object* data) { return osgGA::GUIEventHandler::run(object, data); }
529
531
532 virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const;
533
534protected:
535
537
540
543
544 bool mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter& ea, int& x, int &y) const;
545
546 void resize(int width, int height);
547
550
553
554};
555
556}
557
558#endif
Definition fstream:47
Definition EventHandler:34
virtual EventHandler * asEventHandler()
Definition EventHandler:52
Definition GUIActionAdapter:62
Definition GUIEventAdapter:82
Definition GUIEventHandler:50
GUIEventHandler()
Definition GUIEventHandler:53
Definition GraphicsWindow:43
const osg::Camera * getCamera() const
Definition osgViewer/ViewerEventHandlers:46
void setUpHUDCamera(osgViewer::ViewerBase *viewer)
void setUpScene(osgViewer::ViewerBase *viewer)
const osg::ApplicationUsage * getApplicationUsage() const
Definition osgViewer/ViewerEventHandlers:38
bool _helpEnabled
Definition osgViewer/ViewerEventHandlers:63
osg::ref_ptr< osg::ApplicationUsage > _applicationUsage
Definition osgViewer/ViewerEventHandlers:59
virtual void getUsage(osg::ApplicationUsage &usage) const
void setApplicationUsage(osg::ApplicationUsage *au)
Definition osgViewer/ViewerEventHandlers:36
void setKeyEventTogglesOnScreenHelp(int key)
Definition osgViewer/ViewerEventHandlers:40
osg::ref_ptr< osg::Camera > _camera
Definition osgViewer/ViewerEventHandlers:66
HelpHandler(osg::ApplicationUsage *au=0)
osg::ApplicationUsage * getApplicationUsage()
Definition osgViewer/ViewerEventHandlers:37
bool _initialized
Definition osgViewer/ViewerEventHandlers:65
osg::ref_ptr< osg::Switch > _switch
Definition osgViewer/ViewerEventHandlers:67
osg::Camera * getCamera()
Definition osgViewer/ViewerEventHandlers:45
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
int getKeyEventTogglesOnScreenHelp() const
Definition osgViewer/ViewerEventHandlers:41
int _keyEventTogglesOnScreenHelp
Definition osgViewer/ViewerEventHandlers:61
virtual const NodeCallback * asNodeCallback() const
Definition osgViewer/ViewerEventHandlers:516
InteractiveImageHandler(osg::Image *image)
Constructor to use when the InteractiveImage is in the 3D scene (i.e. not in a fullscreen HUD overlay...
bool mousePosition(osgViewer::View *view, osg::NodeVisitor *nv, const osgGA::GUIEventAdapter &ea, int &x, int &y) const
virtual const osgGA::EventHandler * asEventHandler() const
Definition osgViewer/ViewerEventHandlers:525
virtual bool cull(osg::NodeVisitor *nv, osg::Drawable *drawable, osg::RenderInfo *renderInfo) const
virtual const DrawableCullCallback * asDrawableCullCallback() const
Definition osgViewer/ViewerEventHandlers:522
osg::observer_ptr< osg::Camera > _camera
Definition osgViewer/ViewerEventHandlers:552
InteractiveImageHandler()
Definition osgViewer/ViewerEventHandlers:538
InteractiveImageHandler(osg::Image *image, osg::Texture2D *texture, osg::Camera *camera)
Constructor to use when the InteractiveImage is in a fullscreen HUD overlay.
virtual DrawableEventCallback * asDrawableEventCallback()
Definition osgViewer/ViewerEventHandlers:518
virtual bool run(osg::Object *object, osg::Object *data)
Definition osgViewer/ViewerEventHandlers:528
virtual const DrawableEventCallback * asDrawableEventCallback() const
Definition osgViewer/ViewerEventHandlers:519
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *nv)
osg::observer_ptr< osg::Texture2D > _texture
Definition osgViewer/ViewerEventHandlers:549
META_Object(osgViewer, InteractiveImageHandler)
virtual DrawableCullCallback * asDrawableCullCallback()
Definition osgViewer/ViewerEventHandlers:521
virtual ~InteractiveImageHandler()
Definition osgViewer/ViewerEventHandlers:536
InteractiveImageHandler(const InteractiveImageHandler &, const osg::CopyOp &=osg::CopyOp::SHALLOW_COPY)
Definition osgViewer/ViewerEventHandlers:541
void resize(int width, int height)
virtual osgGA::EventHandler * asEventHandler()
Definition osgViewer/ViewerEventHandlers:524
osg::observer_ptr< osg::Image > _image
Definition osgViewer/ViewerEventHandlers:548
bool _fullscreen
Definition osgViewer/ViewerEventHandlers:551
virtual NodeCallback * asNodeCallback()
Definition osgViewer/ViewerEventHandlers:515
int _keyEventIncreaseLODScale
Definition osgViewer/ViewerEventHandlers:376
void setKeyEventDecreaseLODScale(int key)
Definition osgViewer/ViewerEventHandlers:365
int _keyEventDecreaseLODScale
Definition osgViewer/ViewerEventHandlers:377
virtual void getUsage(osg::ApplicationUsage &usage) const
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
int getKeyEventDecreaseLODScale() const
Definition osgViewer/ViewerEventHandlers:366
int getKeyEventIncreaseLODScale() const
Definition osgViewer/ViewerEventHandlers:363
void setKeyEventIncreaseLODScale(int key)
Definition osgViewer/ViewerEventHandlers:362
double _interval
Definition osgViewer/ViewerEventHandlers:346
bool _currentlyPlaying
Definition osgViewer/ViewerEventHandlers:345
int _keyEventToggleRecord
Definition osgViewer/ViewerEventHandlers:340
int _autoinc
Definition osgViewer/ViewerEventHandlers:337
int getKeyEventToggleRecord() const
Definition osgViewer/ViewerEventHandlers:323
osgDB::ofstream _fout
Definition osgViewer/ViewerEventHandlers:338
void setKeyEventToggleRecord(int key)
Definition osgViewer/ViewerEventHandlers:322
bool _currentlyRecording
Definition osgViewer/ViewerEventHandlers:344
osg::Timer_t _lastFrameTime
Definition osgViewer/ViewerEventHandlers:349
osg::ref_ptr< osgGA::AnimationPathManipulator > _animPathManipulator
Definition osgViewer/ViewerEventHandlers:351
void setKeyEventTogglePlayback(int key)
Definition osgViewer/ViewerEventHandlers:325
std::string _filename
Definition osgViewer/ViewerEventHandlers:336
int _keyEventTogglePlayback
Definition osgViewer/ViewerEventHandlers:341
double _delta
Definition osgViewer/ViewerEventHandlers:347
osg::ref_ptr< osgGA::CameraManipulator > _oldManipulator
Definition osgViewer/ViewerEventHandlers:352
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
RecordCameraPathHandler(const std::string &filename="saved_animation.path", float fps=25.0f)
osg::ref_ptr< osg::AnimationPath > _animPath
Definition osgViewer/ViewerEventHandlers:350
virtual void getUsage(osg::ApplicationUsage &usage) const
void setAutoIncrementFilename(bool autoinc=true)
Definition osgViewer/ViewerEventHandlers:328
int getKeyEventTogglePlayback() const
Definition osgViewer/ViewerEventHandlers:326
osg::Timer_t _animStartTime
Definition osgViewer/ViewerEventHandlers:348
Definition osgViewer/ViewerEventHandlers:413
virtual void operator()(const osg::Image &image, const unsigned int context_id)=0
SavePolicy
Definition osgViewer/ViewerEventHandlers:423
@ SEQUENTIAL_NUMBER
Definition osgViewer/ViewerEventHandlers:425
@ OVERWRITE
Definition osgViewer/ViewerEventHandlers:424
SavePolicy getSavePolicy() const
Definition osgViewer/ViewerEventHandlers:434
const std::string _extension
Definition osgViewer/ViewerEventHandlers:441
SavePolicy _savePolicy
Definition osgViewer/ViewerEventHandlers:443
std::vector< unsigned int > _contextSaveCounter
Definition osgViewer/ViewerEventHandlers:445
virtual void operator()(const osg::Image &image, const unsigned int context_id)
const std::string _filename
Definition osgViewer/ViewerEventHandlers:440
WriteToFile(const std::string &filename, const std::string &extension, SavePolicy savePolicy=SEQUENTIAL_NUMBER)
void setSavePolicy(SavePolicy savePolicy)
Definition osgViewer/ViewerEventHandlers:433
bool _startCapture
Definition osgViewer/ViewerEventHandlers:486
int getKeyEventToggleContinuousCapture() const
Definition osgViewer/ViewerEventHandlers:456
osg::ref_ptr< CaptureOperation > _operation
Definition osgViewer/ViewerEventHandlers:493
void setKeyEventToggleContinuousCapture(int key)
Definition osgViewer/ViewerEventHandlers:455
virtual void captureNextFrame(osgViewer::ViewerBase &viewer)
osg::Camera * findAppropriateCameraForCallback(osgViewer::ViewerBase &viewer)
ScreenCaptureHandler(CaptureOperation *defaultOperation=0, int numFrames=1)
void setFramesToCapture(int numFrames)
void setCaptureOperation(CaptureOperation *operation)
void setKeyEventTakeScreenShot(int key)
Definition osgViewer/ViewerEventHandlers:452
bool _stopCapture
Definition osgViewer/ViewerEventHandlers:487
void removeCallbackFromViewer(osgViewer::ViewerBase &viewer)
int _keyEventTakeScreenShot
Definition osgViewer/ViewerEventHandlers:489
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
int getKeyEventTakeScreenShot() const
Definition osgViewer/ViewerEventHandlers:453
void addCallbackToViewer(osgViewer::ViewerBase &viewer)
int _keyEventToggleContinuousCapture
Definition osgViewer/ViewerEventHandlers:490
osg::ref_ptr< osg::Camera::DrawCallback > _callback
Definition osgViewer/ViewerEventHandlers:494
CaptureOperation * getCaptureOperation() const
virtual void getUsage(osg::ApplicationUsage &usage) const
void addUserStatsLine(const std::string &label, const osg::Vec4 &textColor, const osg::Vec4 &barColor, const std::string &timeTakenName, float multiplier, bool average, bool averageInInverseSpace, const std::string &beginTimeName, const std::string &endTimeName, float maxValue)
virtual void getUsage(osg::ApplicationUsage &usage) const
void createTimeStatsLine(const std::string &lineLabel, osg::Vec3 pos, const osg::Vec4 &textColor, const osg::Vec4 &barColor, osg::Stats *viewerStats, osg::Stats *stats, const std::string &timeTakenName, float multiplier, bool average, bool averageInInverseSpace, const std::string &beginTimeName, const std::string &endTimeName)
ViewerBase::ThreadingModel _threadingModel
Definition osgViewer/ViewerEventHandlers:184
void setUpScene(osgViewer::ViewerBase *viewer)
osg::Geometry * createGeometry(const osg::Vec3 &pos, float height, const osg::Vec4 &colour, unsigned int numBlocks)
std::vector< UserStatsLine > UserStatsLines
Definition osgViewer/ViewerEventHandlers:226
UserStatsLines _userStatsLines
Definition osgViewer/ViewerEventHandlers:227
void setWindowSize(int width, int height)
osg::ref_ptr< osgText::Text > _threadingModelText
Definition osgViewer/ViewerEventHandlers:185
int getKeyEventTogglesOnScreenStats() const
Definition osgViewer/ViewerEventHandlers:91
osg::Geometry * createFrameMarkers(const osg::Vec3 &pos, float height, const osg::Vec4 &colour, unsigned int numBlocks)
unsigned int _frameRateChildNum
Definition osgViewer/ViewerEventHandlers:187
osg::ref_ptr< osg::Switch > _switch
Definition osgViewer/ViewerEventHandlers:180
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
osg::Geometry * createTick(const osg::Vec3 &pos, float height, const osg::Vec4 &colour, unsigned int numTicks)
void setKeyEventTogglesOnScreenStats(int key)
Definition osgViewer/ViewerEventHandlers:90
osg::Camera * getCamera()
Definition osgViewer/ViewerEventHandlers:100
void setUpHUDCamera(osgViewer::ViewerBase *viewer)
const osg::Camera * getCamera() const
Definition osgViewer/ViewerEventHandlers:101
osg::ref_ptr< osg::Geode > _statsGeode
Definition osgViewer/ViewerEventHandlers:182
int _keyEventPrintsOutStats
Definition osgViewer/ViewerEventHandlers:173
int _statsType
Definition osgViewer/ViewerEventHandlers:175
float _statsWidth
Definition osgViewer/ViewerEventHandlers:194
double _blockMultiplier
Definition osgViewer/ViewerEventHandlers:192
double getBlockMultiplier() const
Definition osgViewer/ViewerEventHandlers:96
float _leftPos
Definition osgViewer/ViewerEventHandlers:199
float _characterSize
Definition osgViewer/ViewerEventHandlers:200
unsigned int _viewerSceneChildNum
Definition osgViewer/ViewerEventHandlers:190
std::string _font
Definition osgViewer/ViewerEventHandlers:197
StatsType
Definition osgViewer/ViewerEventHandlers:81
@ LAST
Definition osgViewer/ViewerEventHandlers:87
@ VIEWER_STATS
Definition osgViewer/ViewerEventHandlers:84
@ CAMERA_SCENE_STATS
Definition osgViewer/ViewerEventHandlers:85
@ NO_STATS
Definition osgViewer/ViewerEventHandlers:82
@ FRAME_RATE
Definition osgViewer/ViewerEventHandlers:83
@ VIEWER_SCENE_STATS
Definition osgViewer/ViewerEventHandlers:86
osg::Geometry * createBackgroundRectangle(const osg::Vec3 &pos, const float width, const float height, osg::Vec4 &color)
void createCameraTimeStats(osg::Vec3 &pos, bool acquireGPUStats, osg::Stats *viewerStats, osg::Camera *camera)
float _statsHeight
Definition osgViewer/ViewerEventHandlers:195
void removeUserStatsLine(const std::string &label)
void setKeyEventPrintsOutStats(int key)
Definition osgViewer/ViewerEventHandlers:93
unsigned int _numBlocks
Definition osgViewer/ViewerEventHandlers:191
bool _initialized
Definition osgViewer/ViewerEventHandlers:177
float _startBlocks
Definition osgViewer/ViewerEventHandlers:198
virtual void collectWhichCamerasToRenderStatsFor(osgViewer::ViewerBase *viewer, osgViewer::ViewerBase::Cameras &cameras)
int _keyEventTogglesOnScreenStats
Definition osgViewer/ViewerEventHandlers:172
unsigned int _cameraSceneChildNum
Definition osgViewer/ViewerEventHandlers:189
unsigned int _viewerChildNum
Definition osgViewer/ViewerEventHandlers:188
int getKeyEventPrintsOutStats() const
Definition osgViewer/ViewerEventHandlers:94
osg::ref_ptr< osg::Camera > _camera
Definition osgViewer/ViewerEventHandlers:178
float _lineHeight
Definition osgViewer/ViewerEventHandlers:201
void setChangeEndBarrierPosition(bool flag)
Definition osgViewer/ViewerEventHandlers:293
bool _changeEndBarrierPosition
Definition osgViewer/ViewerEventHandlers:304
int getKeyEventChangeThreadingModel() const
Definition osgViewer/ViewerEventHandlers:285
virtual void getUsage(osg::ApplicationUsage &usage) const
void setChangeThreadingModel(bool flag)
Definition osgViewer/ViewerEventHandlers:287
bool _changeThreadingModel
Definition osgViewer/ViewerEventHandlers:301
bool getChangeThreadingModel() const
Definition osgViewer/ViewerEventHandlers:288
bool getChangeEndBarrierPosition() const
Definition osgViewer/ViewerEventHandlers:294
osg::Timer_t _tickOrLastKeyPress
Definition osgViewer/ViewerEventHandlers:306
int _keyEventChangeThreadingModel
Definition osgViewer/ViewerEventHandlers:300
int _keyEventChangeEndBarrierPosition
Definition osgViewer/ViewerEventHandlers:303
void setKeyEventChangeThreadingModel(int key)
Definition osgViewer/ViewerEventHandlers:284
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
int getKeyEventChangeEndBarrierPosition() const
Definition osgViewer/ViewerEventHandlers:291
void setKeyEventChangeEndBarrierPosition(int key)
Definition osgViewer/ViewerEventHandlers:290
virtual void getUsage(osg::ApplicationUsage &usage) const
void setKeyEventToggleSyncToVBlankHandler(int key)
Definition osgViewer/ViewerEventHandlers:389
int _keyEventToggleSyncToVBlank
Definition osgViewer/ViewerEventHandlers:400
bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
int getKeyEventToggleSyncToVBlankHandler() const
Definition osgViewer/ViewerEventHandlers:390
Definition osgViewer/View:76
Definition ViewerBase:36
ThreadingModel
Definition ViewerBase:78
std::vector< osg::Camera * > Cameras
Definition ViewerBase:263
void setKeyEventWindowedResolutionUp(int key)
Definition osgViewer/ViewerEventHandlers:247
int getKeyEventToggleFullscreen() const
Definition osgViewer/ViewerEventHandlers:242
int _keyEventWindowedResolutionDown
Definition osgViewer/ViewerEventHandlers:268
void setToggleFullscreen(bool flag)
Definition osgViewer/ViewerEventHandlers:244
unsigned int getNearestResolution(int screenWidth, int screenHeight, int width, int height) const
int _keyEventWindowedResolutionUp
Definition osgViewer/ViewerEventHandlers:267
void setKeyEventToggleFullscreen(int key)
Definition osgViewer/ViewerEventHandlers:241
int _keyEventToggleFullscreen
Definition osgViewer/ViewerEventHandlers:264
void toggleFullscreen(osgViewer::GraphicsWindow *window)
virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
int getKeyEventWindowedResolutionDown() const
Definition osgViewer/ViewerEventHandlers:250
bool _toggleFullscreen
Definition osgViewer/ViewerEventHandlers:265
bool getChangeWindowedResolution() const
Definition osgViewer/ViewerEventHandlers:253
bool _changeWindowedResolution
Definition osgViewer/ViewerEventHandlers:269
std::vector< osg::Vec2 > _resolutionList
Definition osgViewer/ViewerEventHandlers:270
void setKeyEventWindowedResolutionDown(int key)
Definition osgViewer/ViewerEventHandlers:249
virtual void getUsage(osg::ApplicationUsage &usage) const
int getKeyEventWindowedResolutionUp() const
Definition osgViewer/ViewerEventHandlers:248
void setChangeWindowedResolution(bool flag)
Definition osgViewer/ViewerEventHandlers:252
void changeWindowedResolution(osgViewer::GraphicsWindow *window, bool increase)
int _currentResolutionIndex
Definition osgViewer/ViewerEventHandlers:271
bool getToggleFullscreen() const
Definition osgViewer/ViewerEventHandlers:245
Definition ApplicationUsage:26
Callback()
Definition Callback:38
virtual bool run(osg::Object *object, osg::Object *data)
Definition Callback:80
Definition Camera:45
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
Definition Callback:341
virtual DrawableCullCallback * asDrawableCullCallback()
Definition Callback:351
DrawableCullCallback()
Definition Callback:343
virtual DrawableEventCallback * asDrawableEventCallback()
Definition Callback:330
DrawableEventCallback()
Definition Callback:322
Definition Drawable:89
Definition Geometry:31
Definition Image:179
NodeCallback()
Definition Callback:219
virtual NodeCallback * asNodeCallback()
Definition Callback:227
Definition NodeVisitor:82
Definition Object:61
Object()
Definition Object:69
Definition Referenced:44
Definition RenderInfo:28
Definition Stats:29
Definition Texture2D:25
Definition observer_ptr:39
Definition ref_ptr:32
Definition Callback:21
Definition AlphaFunc:19
Vec3f Vec3
Definition Vec3:21
Vec4f Vec4
Definition Vec4:21
unsigned long long Timer_t
Definition Timer:24
#define OSGVIEWER_EXPORT
Definition osgViewer/Export:40
osg::Vec4 barColor
Definition osgViewer/ViewerEventHandlers:207
std::string timeTakenName
Definition osgViewer/ViewerEventHandlers:208
osg::Vec4 textColor
Definition osgViewer/ViewerEventHandlers:206
bool averageInInverseSpace
Definition osgViewer/ViewerEventHandlers:211
bool average
Definition osgViewer/ViewerEventHandlers:210
std::string endTimeName
Definition osgViewer/ViewerEventHandlers:213
std::string beginTimeName
Definition osgViewer/ViewerEventHandlers:212
UserStatsLine(const std::string &label_, const osg::Vec4 &textColor_, const osg::Vec4 &barColor_, const std::string &timeTakenName_, float multiplier_, bool average_, bool averageInInverseSpace_, const std::string &beginTimeName_, const std::string &endTimeName_, float maxValue_)
Definition osgViewer/ViewerEventHandlers:216
float maxValue
Definition osgViewer/ViewerEventHandlers:214
std::string label
Definition osgViewer/ViewerEventHandlers:205
float multiplier
Definition osgViewer/ViewerEventHandlers:209