This class manages the display of a simulation (either an already made simulation opened in a single lml file by LoadsMovie, or a simple step given by a simulation motor).
More...
#include <LoadsSimulationDriver.h>
|
void | play () |
| Slot called when at each timer tick (i.e. after the same interval of time) More...
|
|
This class manages the display of a simulation (either an already made simulation opened in a single lml file by LoadsMovie, or a simple step given by a simulation motor).
It is just a utility class for handling the display of loads a given time, using a timer.
Constructor.
Set the load manager, and (initial) current loads (if the loads ptr is null, then all atoms initial positions will be stored; just in case they have to move in the future)
virtual LoadsSimulationDriver::~LoadsSimulationDriver |
( |
| ) |
|
|
virtual |
void LoadsSimulationDriver::doOneStep |
( |
| ) |
|
|
signal |
signal call when one step is to be performed
double LoadsSimulationDriver::getDt |
( |
| ) |
const |
void LoadsSimulationDriver::getInitialPosition |
( |
unsigned int |
targetId, |
|
|
double |
pos[3] |
|
) |
| |
|
inlineprivate |
double LoadsSimulationDriver::getNextRefreshTime |
( |
| ) |
|
get the next planed time when the 3D will be refreshed
double LoadsSimulationDriver::getRefreshDt |
( |
| ) |
const |
get delta-t between 3d view refresh
double LoadsSimulationDriver::getTime |
( |
| ) |
const |
double LoadsSimulationDriver::getTMax |
( |
| ) |
const |
double LoadsSimulationDriver::getTMin |
( |
| ) |
const |
void LoadsSimulationDriver::init |
( |
| ) |
|
|
private |
init display and initial positions.
stores all the initial position of the atoms implied in the loads. if current loads is NULL, then all the atoms will have their initial positions stored.
bool LoadsSimulationDriver::isTimerActive |
( |
| ) |
|
is the timer currently running
void LoadsSimulationDriver::maxSpeed |
( |
| ) |
|
set the timer interval to maxSpeed (1000Hz)
void LoadsSimulationDriver::play |
( |
| ) |
|
|
slot |
Slot called when at each timer tick (i.e. after the same interval of time)
void LoadsSimulationDriver::quicker |
( |
| ) |
|
decrease the timer interval by 5ms, thus calling doOneStep more often
void LoadsSimulationDriver::resetPositions |
( |
| ) |
|
reset the 3D positions to the initial value (stored in the map during init), (do not update the display)
void LoadsSimulationDriver::resetTMaxToDefault |
( |
| ) |
|
set default tmax (using the current loads last event)
void LoadsSimulationDriver::resetTMinToDefault |
( |
| ) |
|
set default tmin (using the current loads first event)
void LoadsSimulationDriver::resetToDefault |
( |
| ) |
|
set tmin, tmax and dt to default
void LoadsSimulationDriver::rewind |
( |
| ) |
|
rewind time to tMin (do not update the display)
void LoadsSimulationDriver::setDt |
( |
double |
dt | ) |
|
set the delta-t (default is 0.1)
void LoadsSimulationDriver::setLoads |
( |
Loads * |
| ) |
|
set the current loads to be displayed
void LoadsSimulationDriver::setRefreshDt |
( |
double |
| ) |
|
set delta-t between 3d view refresh (default 0.1)
void LoadsSimulationDriver::setTime |
( |
double |
| ) |
|
set the time to a different value ("jump" to a given time)
void LoadsSimulationDriver::setTMax |
( |
double |
| ) |
|
void LoadsSimulationDriver::setTMin |
( |
double |
| ) |
|
void LoadsSimulationDriver::slower |
( |
| ) |
|
increase the timer interval by 5ms, thus calling doOneStep less often
void LoadsSimulationDriver::startTimer |
( |
| ) |
|
starts the timer that will repeatedly call play and emit doOneStep
void LoadsSimulationDriver::stopTimer |
( |
| ) |
|
void LoadsSimulationDriver::updateAtomData |
( |
| ) |
|
|
private |
void LoadsSimulationDriver::updateDisplay |
( |
bool |
force | ) |
|
update the display using the current loads (and refresh the 3D viewers if parameter is true)
- Parameters
-
force | if true force display update independantly from refresh dt (default is false) |
void LoadsSimulationDriver::updatePositions |
( |
bool |
force | ) |
|
|
private |
update the positions depending on the current loads (and refresh the DCs position if parameter is true)
Loads* LoadsSimulationDriver::currentLoads |
|
private |
double LoadsSimulationDriver::dt |
|
private |
the delta-t used to change t
QMap<unsigned int, Position> LoadsSimulationDriver::initialPositionMap |
|
private |
int LoadsSimulationDriver::interval |
|
private |
double LoadsSimulationDriver::lastRefreshTime |
|
private |
last time the display was refresh
double LoadsSimulationDriver::lastUpdateTime |
|
private |
last time we updated the display
QMap<unsigned int, Position> LoadsSimulationDriver::referencePositionMap |
|
private |
the reference pm positions (used to display the distances, ...)
double LoadsSimulationDriver::refreshDt |
|
private |
the delta-t between two refresh of the 3D view
double LoadsSimulationDriver::t |
|
private |
QTimer* LoadsSimulationDriver::timer |
|
private |
double LoadsSimulationDriver::tMax |
|
private |
double LoadsSimulationDriver::tMin |
|
private |
The documentation for this class was generated from the following file: