00001 /****************************************************************************** 00002 * This file is part of the Gluon Development Platform 00003 * Copyright (C) 2008 Rivo Laks <rivolaks@hot.ee> 00004 * Copyright (C) 2008 Sacha Schutz <istdasklar@free.fr> 00005 * Copyright (C) 2008 Olivier Gueudelot <gueudelotolive@gmail.com> 00006 * Copyright (C) 2008 Charles Huet <packadal@gmail.com> 00007 * Copyright (c) 2010 Arjen Hiemstra <ahiemstra@heimr.nl> 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00022 */ 00023 00024 #ifndef GLUONGRAPHICS_CAMERA_H 00025 #define GLUONGRAPHICS_CAMERA_H 00026 00027 #include <QtCore/QObject> 00028 00029 #include "gluon_graphics_export.h" 00030 00031 class QRectF; 00032 class QSizeF; 00033 class QMatrix4x4; 00034 namespace GluonGraphics 00035 { 00036 class Frustrum; 00037 00045 class GLUON_GRAPHICS_EXPORT Camera : public QObject 00046 { 00047 Q_OBJECT 00048 00049 public: 00057 explicit Camera( QObject* parent = 0 ); 00058 00065 explicit Camera( Frustrum* frustum, QObject* parent = 0 ); 00066 00070 virtual ~Camera(); 00071 00080 QMatrix4x4 viewMatrix(); 00081 00087 Frustrum* frustrum(); 00088 00089 public Q_SLOTS: 00095 void setViewMatrix( const QMatrix4x4& matrix ); 00101 void setFrustrum( GluonGraphics::Frustrum* frustrum ); 00102 00103 private: 00104 class CameraPrivate; 00105 CameraPrivate* const d; 00106 }; 00107 00108 } 00109 00110 #endif // GLUONGRAPHICS_CAMERA_H