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

QSceneTreeNode.h

Go to the documentation of this file.
00001 /*
00002  * QSceneTreeNode.h
00003  * $Id: QSceneTreeNode.h,v 1.13 2001/11/15 16:54:52 guenth Exp $
00004  *
00005  * Copyright (C) 2001 Richard Guenther
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 the QSceneTreeNode class 
00031 //  Purpose     :
00032 //
00033 
00034 #ifndef __QSCENETREENODE_H
00035 #define __QSCENETREENODE_H
00036 
00037 #include <qevent.h>
00038 
00039 #include "CMat4D.h"
00040 #include "CBoundingBox3D.h"
00041 #include "CTree.h"
00042 #include "GLDrawable.h"
00043 
00044 
00049 class QSceneTreeNode : public CTreeNode {
00050 public:
00052   QSceneTreeNode()
00053     : CTreeNode(),
00054       m_pTransformation(NULL),
00055       m_ViewingMode(normal) {};
00057   ~QSceneTreeNode();
00058 
00060   const CMat4D *getTransformation() const { return m_pTransformation; };
00062   void resetTransformation();
00064   void applyTransformation(const CMat4D&);
00065 
00068   virtual CBoundingBox3D getBoundingBox() const;
00069 
00071   enum ViewingMode { hidden, disabled, normal, highlighted, boxed };
00073   ViewingMode getViewingMode() const { return m_ViewingMode; };
00075   virtual void setViewingMode(ViewingMode mode) { m_ViewingMode = mode; };
00076 
00078   virtual void requestUpdate() {
00079     ((QSceneTreeNode *)getParent())->requestUpdate();
00080   };
00081 
00082 protected:
00083    CMat4D *m_pTransformation;
00084    ViewingMode m_ViewingMode;
00085 };
00086 
00087 
00090 class QSceneTreeDrawable : public QSceneTreeNode, public GLDrawable {
00091 public:
00093   QSceneTreeDrawable() : QSceneTreeNode() {};
00095   ~QSceneTreeDrawable(){};
00096 
00098   virtual bool event(const QEvent *) { return false; };
00099 };
00100 
00101 
00102 
00103 #endif

Generated on Wed Oct 22 05:02:31 2003 for QGLViewer by doxygen 1.3.4