OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CompileSlideCallback.h
Go to the documentation of this file.
1 /* -*-c++-*- Present3D - Copyright (C) 1999-2006 Robert Osfield
2  *
3  * This software is open source and may be redistributed and/or modified under
4  * the terms of the GNU General Public License (GPL) version 2.0.
5  * The full license is in LICENSE.txt file included with this distribution,.
6  *
7  * This software is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * include LICENSE.txt for more details.
11 */
12 
13 #ifndef OSG_COMPILESLIDECALLBACK
14 #define OSG_COMPILESLIDECALLBACK 1
15 
16 #include <osgViewer/Viewer>
17 #include <osgPresentation/Export>
18 
19 namespace osgPresentation {
20 
22 {
23  public:
24 
26  _needCompile(false),
27  _frameNumber(0) {}
28 
29  virtual void operator()(const osg::Camera& camera) const;
30 
31  void needCompile(osg::Node* node) { _needCompile=true; _sceneToCompile = node; }
32 
33  protected:
34 
35  virtual ~CompileSlideCallback() {}
36 
37  mutable bool _needCompile;
38  mutable unsigned int _frameNumber;
40 
41 };
42 
43 }
44 
45 #endif
#define OSGPRESENTATION_EXPORT
Definition: Export.h:38
osg::ref_ptr< osg::Node > _sceneToCompile
Definition: Node.h:71