Space Comps
 All Classes Files Functions Variables
collisiondisplay3d.h
1 #ifndef COLLISIONDISPLAY3D_H
2 #define COLLISIONDISPLAY3D_H
3 
4 #include <QGLView>
5 #include <unordered_map>
6 #include "collisiondisplay.h"
7 #include "qparticle3d.h"
8 
17 class CollisionDisplay3D : public QGLView, public CollisionDisplay
18 {
19  Q_OBJECT
20 public:
30  explicit CollisionDisplay3D(QWindow *parent = 0);
32 
33 // QTimer* getTimer();
34 // int getNumCollisions();
35 // void setQAlgorithm(QAlgorithm *qalgorithm);
36 
37 signals:
44  void finished();
45 
46 public slots:
54  void start();
55 
62  void stop();
63 
73  void step();
74 
75 private:
76  void paintGL(QGLPainter* painter);
77 // void initializeGL(QGLPainter* painter);
78 
79  QVector3DArray boundaryCube;
80  void buildBoundaryCube();
81 
82  std::vector<QParticle3D*> drawnParticles;
83  std::unordered_map<Particle*, QParticle3D*> particleMap;
84 };
85 
86 #endif // COLLISIONDISPLAY3D_H
The parent class of 2D and 3D visualization windows.
Definition: collisiondisplay.h:14
CollisionDisplay3D(QWindow *parent=0)
Constructs a CollisionDisplay3D.
Definition: collisiondisplay3d.cpp:7
The view containing 3D visualization.
Definition: collisiondisplay3d.h:17
void start()
Reinitializes counters and lists and begins the timer.
Definition: collisiondisplay3d.cpp:57
void step()
Performs one step of the display.
Definition: collisiondisplay3d.cpp:105
void stop()
Stops the timer and clears lists.
Definition: collisiondisplay3d.cpp:91
void finished()
Signals that the display has finished.