SingleScreen 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef OSGVIEWER_SingleScreen
  14. #define OSGVIEWER_SingleScreen 1
  15. #include <osgViewer/View>
  16. namespace osgViewer {
  17. /** single camera associated with a single full screen GraphicsWindow.*/
  18. class OSGVIEWER_EXPORT SingleScreen : public ViewConfig
  19. {
  20. public:
  21. SingleScreen(unsigned int screenNum=0) : _screenNum(screenNum) {}
  22. SingleScreen(const SingleScreen& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) : ViewConfig(rhs,copyop), _screenNum(rhs._screenNum) {}
  23. META_Object(osgViewer, SingleScreen);
  24. virtual void configure(osgViewer::View& view) const;
  25. void setScreenNum(unsigned int sn) { _screenNum = sn; }
  26. unsigned int getScreenNum() const { return _screenNum; }
  27. protected:
  28. unsigned int _screenNum;
  29. };
  30. }
  31. #endif