Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

camera.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                         camera.h  -  Base camera class
00003                              -------------------
00004     begin                : Sat Nov 3 2001
00005     copyright            : (C) 2001 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, camera.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2001
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 #ifndef __NECAMERA_H
00028 #define __NECAMERA_H
00029 
00030 
00037 #include "base.h"
00038 #include "scenenode.h"
00039 
00040 #include <string>
00041 
00042 
00043 namespace NeoEngine
00044 {
00045 
00046 
00047 // External classes
00048 class Room;
00049 
00050 
00055 class NEOENGINE_API Camera : public SceneNode
00056 {
00057 
00058     public:
00059 
00060         DefineVisitable();
00061 
00062     protected:
00063 
00065         Room                                         *m_pkRoom;
00066 
00068         static Camera                               *s_pkActiveCamera;
00069 
00070 
00071     public:
00072 
00078                                                      Camera( const std::string &rstrName, SceneNode *pkParent = 0 );
00079 
00086         bool                                         Render( Frustum *pkFrustum = 0, bool bForce = false );
00087 
00093         void                                         LookAt( const Vector3d &rkAt, const Vector3d &rkUp );
00094 
00098         inline const Matrix                          &GetViewMatrix() { return GetInverseWorldTransform(); }
00099 
00103         const Matrix                                &GetInverseViewMatrix() { return GetWorldTransform(); }
00104 
00109         void                                         SetRoom( Room *pkRoom );
00110 
00114         Room                                        *GetRoom() { return m_pkRoom; }
00115 
00119         void                                         SetActive() { s_pkActiveCamera = this; }
00120 
00124         static Camera                               *GetActive() { return s_pkActiveCamera; }
00125 };
00126 
00127 
00128 }
00129 
00130 
00131 #endif

Generated on Wed Jan 21 14:21:06 2004 for NeoEngine by doxygen 1.3.5