00001 /****************************************************************************** 00002 * This file is part of the Gluon Development Platform 00003 * Copyright (C) 2008 Sacha Schutz <istdasklar@free.fr> 00004 * Copyright (C) 2008 Olivier Gueudelot <gueudelotolive@gmail.com> 00005 * Copyright (C) 2008 Charles Huet <packadal@gmail.com> 00006 * Copyright (c) 2010 Arjen Hiemstra <ahiemstra@heimr.nl> 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this library; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 */ 00022 00023 #ifndef GLUONGRAPHICS_ITEM_H 00024 #define GLUONGRAPHICS_ITEM_H 00025 00026 #include "gluon_graphics_export.h" 00027 00028 #include <QtCore/QObject> 00029 00030 class QMatrix4x4; 00031 namespace GluonGraphics 00032 { 00033 00034 class MaterialInstance; 00035 00036 class Mesh; 00037 00047 class GLUON_GRAPHICS_EXPORT Item : public QObject 00048 { 00049 Q_OBJECT 00050 public: 00051 Item( QObject* parent = 0 ); 00052 virtual ~Item(); 00053 00060 QMatrix4x4 transform(); 00061 00067 Mesh* mesh(); 00068 00076 MaterialInstance* materialInstance(); 00077 00078 public Q_SLOTS: 00082 virtual void render(); 00083 00089 void setTransform( const QMatrix4x4 transform ); 00090 00096 void setMesh( Mesh* mesh ); 00097 00104 void setMaterialInstance( MaterialInstance* material ); 00105 00106 private: 00107 class ItemPrivate; 00108 ItemPrivate* const d; 00109 }; 00110 00111 } 00112 #endif // GLUONGRAPHICS_ITEM_H