root/OpenSceneGraph/trunk/include/osgPresentation/CompileSlideCallback @ 13041

Revision 13041, 1.2 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
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
19namespace osgPresentation {
20
21class OSGPRESENTATION_EXPORT CompileSlideCallback : public osg::Camera::DrawCallback
22{
23    public:
24
25        CompileSlideCallback():
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;
39        osg::ref_ptr<osg::Node>     _sceneToCompile;
40
41};
42
43}
44
45#endif
Note: See TracBrowser for help on using the browser.