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

CSceneTreeRenderer.h

Go to the documentation of this file.
00001 /*
00002  * CSceneTreeRenderer.h
00003  * $Id: CSceneTreeRenderer.h,v 1.3 2001/11/15 16:54:51 guenth 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  * As a special exception to the GPL, the QGLViewer authors (Markus
00022  * Janich, Michael Meissner, Richard Guenther, Alexander Buck and Thomas
00023  * Woerner) give permission to link this program with Qt (non-)commercial
00024  * edition, and distribute the resulting executable, without including
00025  * the source code for the Qt (non-)commercial edition in the source
00026  * distribution.
00027  *
00028  */
00029 
00030 //  Description :  Definition of an example renderer drawing a cube
00031 //                 in wire frame and some spheres using a scene tree.
00032 //                 It also catches a key signal as shown in the simple
00033 //                 example.
00034 
00035 
00036 #ifndef CRENDERER__H
00037 #define CRENDERER__H
00038     
00039     
00040 // Own
00042 #include "QSceneTreeViewer.h"
00043 #include "QSceneTreeNode.h"
00044 #include "QSceneTreeRenderer.h"
00045 #include "STQGLExampleObjects.h"
00046 
00047 
00048 // Qt
00050 #include <qevent.h>
00051 #include <qmainwindow.h>
00052 #include <qslider.h>
00053 #include <qgl.h>
00054 
00055 
00056 // System
00058 #include <math.h>
00059 
00060 
00061 
00072 class CSceneTreeRenderer : public QSceneTreeRenderer {
00073   Q_OBJECT
00074 
00075   //****** All methods ******
00076 
00077 public:
00079   CSceneTreeRenderer(QGLViewer*);
00081   ~CSceneTreeRenderer();
00082 
00084   QGLViewer* getViewer(void) { return m_pViewer; };
00085 
00086 
00087   // **** All the slots *****
00088 private slots:
00089 
00091   virtual void sltResizeGL(int w, int h);
00092 
00094   virtual void sltManageSelection(QMouseEvent *pqEvent);
00095 
00097   virtual void sltManageMove(QMouseEvent *pqEvent);
00098 
00100   void sltCatchKey(int);
00101 
00104   void sltResetSelection();
00105 
00106 private:
00107   //****** All data ******
00108 
00109   QGLViewer *m_pViewer;
00110 
00111   CP3D m_cSphereCenter[12];            // saves centers of the spheres
00112   STQGLExampleSphere *m_apSphere[12];
00113 };
00114 
00115 #endif // CRENDERER__H 

Generated on Wed Nov 17 23:15:19 2004 for QGLViewer by  doxygen 1.3.9.1