Página Principal   Hierarquia de Classes   Lista de Componentes   Lista de Arquivos   Componentes Membros  

Camera.hpp

00001 /*      Camera.hpp - Morpheous
00002  *
00003  *  $Header: /home/aldon/cvs/Morpheous/include/Camera.hpp,v 1.5 2003/08/21 01:56:02 aldon Exp $
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018  */
00019 
00020 
00021 #ifndef __CAMERA_HPP__
00022 #define __CAMERA_HPP__
00023 
00024 
00025 #include "Vector.hpp"
00026 #include "Matrix.hpp"
00027 
00028 
00032 class Camera
00033 {
00034 private:
00038     Vector position;
00039 
00043     Vector orientation;
00044 
00048     float focalLength;
00049 
00053     Matrix rotationMatrix;
00054 
00058     Matrix projectionMatrix;
00059 
00063     Matrix displayMatrix;
00064 
00068     float width;
00069     
00073     float height;
00074 
00075 
00080     float getAngle(float x, float y);
00081 
00082 
00083 public:
00088     const Vector& getPosition() const;
00089 
00094     void setPosition(const Vector& newPosition);
00095 
00100     const Vector& getOrientation() const;
00101 
00106     void setOrientation(const Vector& newOrientation);
00107     
00112     void pointTo(const Vector& where);
00113 
00118     float getFocalLength() const;
00119 
00124     void setFocalLength(float newFocalLength);
00125 
00130     void setFieldOfView(float newFieldOfView);
00131 
00135     void makeProjectionMatrix();
00136 
00141     const Matrix& getProjectionMatrix() const;
00142 
00146     void makeRotationMatrix();
00147 
00152     const Matrix& getRotationMatrix() const;
00153 
00157     void makeDisplayMatrix();
00158 
00163     const Matrix& getDisplayMatrix() const;
00164 
00170     void setImageDimensions(float newWidth, float newHeight);
00171 };
00172 
00173 
00174 #endif // __CAMERA_HPP__

Gerado em Sun Sep 21 20:18:44 2003 para Morpheous por doxygen1.2.13.1 escrito por Dimitri van Heesch, © 1997-2001