00001 /***************************************************************************** 00002 * SGL: A Scene Graph Library 00003 * 00004 * Copyright (C) 1997-2001 Scott McMillan All Rights Reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public 00017 * License along with this library; if not, write to the Free 00018 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 ***************************************************************************** 00020 * File: sglCamera.hpp 00021 * Author: Scott McMillan 00022 * Created: 19 December 2000 00023 * Summary: abstract base class for cameras (subclassed to perspective and 00024 * orthographic cameras. 00025 *****************************************************************************/ 00026 00027 #ifndef __SGL_CAMERA_HPP 00028 #define __SGL_CAMERA_HPP 00029 00030 #include <sgl.h> 00031 #include <sglObject.hpp> 00032 #include <sglFrustum.hpp> 00033 00034 //---------------------------------------------------------------------------- 00035 00054 class SGL_DLL_API sglCamera : public sglObject 00055 { 00056 public: 00058 sglCamera(); 00059 00061 virtual ~sglCamera(); 00062 00068 const sglFrustumd &getFrustum() const { return m_frustum; } 00069 00074 virtual void applyProjection() const = 0; 00075 00076 // See sglObject::printInfo() for details. 00077 virtual void printInfo(ostream &ostrm, const char *indent_string) const; 00078 00079 protected: 00080 sglCamera(const sglCamera &); // not implemented 00081 sglCamera &operator=(const sglCamera &); // not implemented 00082 00083 protected: 00084 double m_near; 00085 double m_far; 00086 00087 sglFrustumd m_frustum; 00088 }; 00089 00090 #endif