00001 /*************************************************************************** 00002 * Copyright (c) 2010 Art Tevs * 00003 * * 00004 * This library is free software; you can redistribute it and/or modify * 00005 * it under the terms of the GNU Lesser General Public License as * 00006 * published by the Free Software Foundation; either version 3 of * 00007 * the License, or (at your option) any later version. * 00008 * * 00009 * This library is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00012 * GNU Lesse General Public License for more details. * 00013 * * 00014 * The full license is in LICENSE file included with this distribution. * 00015 ***************************************************************************/ 00016 #ifndef _C_OSGPPU_CAMERA__H_ 00017 #define _C_OSGPPU_CAMERA__H_ 00018 00019 //------------------------------------------------------------------------- 00020 // Includes 00021 //------------------------------------------------------------------------- 00022 #include <osgPPU/Export.h> 00023 #include <osgPPU/Unit.h> 00024 #include <osg/Camera> 00025 #include <osg/FrameBufferObject> 00026 00027 namespace osgPPU 00028 { 00029 00030 //! Camera class which can be used with osgPPU 00031 /** 00032 * A camera class which acts as a wrapper for standard osg::Camera 00033 * and includes useful methods for proper use of osgPPU. 00034 * 00035 * NOTE: You do not have to use this class, this is just a wrapper for simple usage. 00036 **/ 00037 class OSGPPU_EXPORT Camera : public osg::Camera 00038 { 00039 public: 00040 00041 /** 00042 * Resize camera's viewport. This will also resize camera's attachments if such exists. 00043 * Call this method when you have resized your window and wish to update the camera to 00044 * the new size. 00045 **/ 00046 static void resizeViewport(int x, int y, int width, int height, osg::Camera* camera); 00047 }; 00048 00049 }; 00050 00051 #endif
Copyright (C) 2008 by Art Tevs (LGPL)