//**************************************************************************** //! \file glview.cpp //! \date 23-05-2003 //! \class GLView //! \brief The GL Display Window derived from the WEngine //***************************************************************************** // This file is part of the Dataview. // // Dataview is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // The Dataview is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with DataView; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #ifndef GLVIEW_HPP #define GLVIEW_HPP #include "engine/engine.hpp" #include #include #include #include using namespace std; class GLView : public WEngine { Q_OBJECT public: double pSize; bool obj; bool col; GLView( QWidget *parent, char const *name); ~GLView(); void setupReplayMode( const bool r = false, const QString file = 0, const int s = 1, const bool d = false, const Tcoord *koo = 0); void setNumPoints( int numpoints) { numPCpoints = numpoints;} public slots: void UpdateObj(); int open( const QString, const int); int open( const QString filename, const int points, const Tcoord *koo, const bool ro = false); void clear(); Tcoord currentConfig() const; // sector selection stuff void enableSectSel( bool sw = true); protected: int LoadPoints( const QString fname, const int inPCp = 10000); virtual void evKeyPress( QKeyEvent *e); virtual void evMouseMove( QMouseEvent *e); //! \brief overloaded member function inherited from QGLWidget sets up all OpenGL related stuff virtual void initializeGL(); //! \brief overloaded member function inherited from WEngine doing the actual replay stuff virtual void director(); private: void resetKoo(); int finddel(); inline void drawPoint( const double *p); inline void drawBox( const double r = 2.0); GLUquadricObj *quad; map listn; unsigned int pointl[10]; unsigned int boxl; bool boxmode; int nl; int dellen; int numPCpoints; QString of, tr1; char tr2[256]; ifstream RFile; bool op, ssel; int Replaypps, pInFile; bool Replaydel, Replay; double boxlen; double boxPos[6]; unsigned int replaylist; double p[3]; }; #endif