GLWireframe.h

gehe zur Dokumentation dieser Datei
00001 
00006 #ifndef __GLWIREFRAME__
00007 #define __GLWIREFRAME__
00008 
00009 #include <qgl.h>
00010 
00011 
00012 #include "../Fahrzeug.h"
00013 #include "../Kreuzung.h"
00014 #include "../Konstanten.h"
00015 #include "../Liste.h"
00016 #include "../Spur.h"
00017 
00018 
00024 class GLWireframe : public QGLWidget
00025 {
00026     Q_OBJECT
00027 
00028 public:
00029  GLWireframe( QWidget* parent = 0, const char* name = 0, QGLWidget *share = 0, WFlags f = 0, Spur** spurenliste = 0, long int anzahlSpuren = 0, Liste *kreuzungsliste = 0 );
00030  GLWireframe( QWidget* parent , const char* name    , QGLWidget *share , WFlags f    , 
00031            double xRotD, double yRotD, double zRotD, double xKameraD, double yKameraD, double zKameraD, Spur** spurenliste, long int anzahlSpuren, Liste *kreuzungsliste  );
00032  ~GLWireframe();
00033 
00034  double gibXRot();
00035  double gibYRot();
00036  double gibZRot();
00037  
00038  double gibXKamera();
00039  double gibYKamera();
00040  double gibZKamera(); 
00041 
00042  void setzeFahrzeugliste( Liste *fahrzeugliste );
00043  void setzeSpurenliste(Spur** spurenliste, long int anzahlSpuren);
00044  void setzeKreuzungsliste(Liste *kreuzungsliste);
00045 
00046  void zeichne();
00047  
00048 public slots:
00049     void setzeXRotation( double grad );
00050     void setzeYRotation( double grad );
00051     void setzeZRotation( double grad );
00052 
00053  void setzeRotationImpulse( double x, double y, double z );
00054  void setzeTranslationImpulse( double x, double y);
00055  void setzeZoom( double aenderung );
00056  
00057  void setzeMaussteuerung( int maussteuerung );
00058  
00059  void ladeWerkseinstellungen();
00060 
00061 protected:
00062  void initializeGL();
00063  void paintGL();
00064  void resizeGL( int breite, int hoehe );
00065  void transform();
00066  
00067  void clear();
00068  void ladeStandardwerte();
00069  double gibMaximaleAusdehnung();
00070  void erzeugeParameter();
00071  
00072  void mousePressEvent( QMouseEvent *event );
00073     void mouseReleaseEvent( QMouseEvent *event );
00074  void mouseMoveEvent( QMouseEvent *event );
00075  void wheelEvent( QWheelEvent *event );
00076  
00077  void setMaterialColor3d(Koordinaten farbe);
00078  void erzeugeZeichenliste();
00079  void zeichneSpur(Spur *spur);
00080  void zeichneHaltelinie(Spur *spur);
00081  void zeichneSpurverbindung(Spur *vorgaenger, Spur *nachfolger);
00082  void zeichneFahrzeug( Fahrzeug *fahrzeug );
00083  void zeichneKreuzung( Kreuzung *kreuzung );
00084  
00085 private:
00086 
00087  GLuint list_;      
00088  long int anzahlSpuren_;    
00089  double maximaleKoordinaten_[3];     
00090  double minimaleKoordinaten_[3];  
00091  double verschiebungsKoordinaten_[3];
00092 
00093     GLfloat xRot_;       
00094  GLfloat yRot_;       
00095  GLfloat zRot_;       
00096         double punktKamera_[3];                 
00097         double punktReferenz_[3];               
00098         double vectorKameraOben_[3];            
00099         QPoint oldPos_;                                         
00100         
00101         GLfloat standardxRot_;                          
00102         GLfloat standardyRot_;                          
00103         GLfloat standardzRot_;                          
00104         double standardpunktKamera_[3];         
00105         double standardpunktReferenz_[3];       
00106         double standardvectorKameraOben_[3];
00107 
00108         Liste *fahrzeugliste_;  
00109         Liste *generatorliste_; 
00110         Liste *kreuzungsliste_; 
00111         Spur **spurenliste_;    
00112         
00113         int maussteuerung_;             
00114 };
00115 
00116 
00117 #endif

Erzeugt am Tue Jun 14 18:36:49 2005 für TraffSpot von  doxygen 1.3.9.1