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: sglOrthographicCamera.hpp 00021 * Author: Scott McMillan 00022 * Created: 19 December 2000 00023 * Summary: Orthographic camera class 00024 *****************************************************************************/ 00025 00026 #ifndef __SGL_ORTHOGRAPHIC_CAMERA_HPP 00027 #define __SGL_ORTHOGRAPHIC_CAMERA_HPP 00028 00029 #include <sglCamera.hpp> 00030 00050 class SGL_DLL_API sglOrthographicCamera : public sglCamera 00051 { 00052 public: 00054 sglOrthographicCamera(); 00055 00057 virtual ~sglOrthographicCamera(); 00058 00073 void setOrtho(double left, double right, double bottom, double top, 00074 double near_clip = -1.0, double far_clip = 1.0); 00075 00079 void getOrtho(double &left, double &right, double &bottom, double &top, 00080 double &near_clip, double &far_clip) const; 00081 00082 // See sglCamera::applyProjection() for details. 00083 virtual void applyProjection() const; 00084 00085 // See sglObject::printInfo() for details. 00086 virtual void printInfo(ostream &ostrm, const char *indent_string) const; 00087 00088 protected: 00089 sglOrthographicCamera(const sglOrthographicCamera &); 00090 sglOrthographicCamera &operator=(const sglOrthographicCamera &); 00091 00092 void buildFrustum(); 00093 00094 protected: 00095 double m_left; 00096 double m_right; 00097 double m_bottom; 00098 double m_top; 00099 }; 00100 00101 #endif