Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

CSceneTreeRenderer.h

Go to the documentation of this file.
00001 /*
00002  * CSceneTreeRenderer.h
00003  * $Id: CSceneTreeRenderer.h,v 1.2 2001/10/01 10:14:49 mjanich Exp $
00004  *
00005  * Copyright (C) 1999, 2000 Markus Janich, Michael Meissner
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  *
00021  */
00022 
00023 //  Description :  Definition of an example renderer drawing a cube
00024 //                 in wire frame and some spheres using a scene tree.
00025 //                 It also catches a key signal as shown in the simple
00026 //                 example.
00027 
00028 
00029 #ifndef CRENDERER__H
00030 #define CRENDERER__H
00031     
00032     
00033 // Own
00035 #include "QSceneTreeViewer.h"
00036 #include "QSceneTreeNode.h"
00037 #include "QSceneTreeRenderer.h"
00038 #include "STQGLExampleObjects.h"
00039 
00040 
00041 // Qt
00043 #include <qevent.h>
00044 #include <qmainwindow.h>
00045 #include <qslider.h>
00046 #include <qgl.h>
00047 
00048 
00049 // System
00051 #include <math.h>
00052 
00053 
00054 
00065 class CSceneTreeRenderer : public QSceneTreeRenderer {
00066   Q_OBJECT
00067 
00068   //****** All methods ******
00069 
00070 public:
00072   CSceneTreeRenderer(QGLViewer*);
00074   ~CSceneTreeRenderer();
00075 
00077   QGLViewer* getViewer(void) { return m_pViewer; };
00078 
00079 
00080   // **** All the slots *****
00081 private slots:
00082 
00084   virtual void sltResizeGL(int w, int h);
00085 
00087   virtual void sltManageSelection(QMouseEvent *pqEvent);
00088 
00090   virtual void sltManageMove(QMouseEvent *pqEvent);
00091 
00093   void sltCatchKey(int);
00094 
00097   void sltResetSelection();
00098 
00099 private:
00100   //****** All data ******
00101 
00102   QGLViewer *m_pViewer;
00103 
00104   CP3D m_cSphereCenter[12];            // saves centers of the spheres
00105   STQGLExampleSphere *m_apSphere[12];
00106 };
00107 
00108 #endif // CRENDERER__H 

Generated at Thu Oct 4 17:17:25 2001 for QGLViewer by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001