The view containing 3D visualization.
More...
#include <collisiondisplay3d.h>
|
void | start () |
| Reinitializes counters and lists and begins the timer. More...
|
|
void | stop () |
| Stops the timer and clears lists. More...
|
|
void | step () |
| Performs one step of the display. More...
|
|
virtual void | start ()=0 |
| Slot used to initialize the display. More...
|
|
virtual void | stop ()=0 |
| Slot used to stop the display. More...
|
|
virtual void | step ()=0 |
| Slot used to step the display. More...
|
|
|
QTimer * | timer |
|
QAlgorithm * | qalg |
|
int | numCollisions |
|
int | displayTimestep |
|
MultiQueue * | positionQueue |
|
std::queue< int > | collisionTimesteps |
|
The view containing 3D visualization.
CollisionDisplay3D inherits from the Qt3D class QGLView to display a 3D visualization of a simulation. It keeps track of and draws QParticle3Ds for each particle of the simulation and allows interaction with the view to change the viewing location.
CollisionDisplay3D::CollisionDisplay3D |
( |
QWindow * |
parent = 0 | ) |
|
|
explicit |
Constructs a CollisionDisplay3D.
Calls CollisionDisplay's constructor to initialize common members and builds the boundary cube representing the space in which the simulation runs.
- Parameters
-
parent | the parent window, if one exists. |
void CollisionDisplay3D::finished |
( |
| ) |
|
|
signal |
void CollisionDisplay3D::start |
( |
| ) |
|
|
slot |
Reinitializes counters and lists and begins the timer.
Reinitializes the timestep and collision counters and builds the list of QParticle3Ds from an Algorithm's list of particles. Starts the display timer to begin updating the display.
void CollisionDisplay3D::step |
( |
| ) |
|
|
slot |
Performs one step of the display.
Increments the display timestep and checks it against the TIMESTEP_LIMIT to see if the display should continue running. If so, attempts to update the position of each QParticle3D and mark them as colliding if they will collide within the specified window. Finally, updates the timer interval to allow the framerate to be changed in real time.
void CollisionDisplay3D::stop |
( |
| ) |
|
|
slot |
Stops the timer and clears lists.
Stops the timer so the display no longer updates and clears the list of QParticle3Ds. Emits the finished() signal.
The documentation for this class was generated from the following files: