Virtual Testbed
Ship dynamics simulator for extreme conditions
|
Public Types | |
using | testbed_type = vtb::core::Testbed< T, 3 > |
using | testbed_gui_type = TestbedGUI< T > |
using | clock_type = std::chrono::high_resolution_clock |
using | time_point = clock_type::time_point |
using | duration = clock_type::duration |
using | float_duration = std::chrono::duration< T > |
using | mutex_type = std::recursive_mutex |
using | thread_type = std::thread |
using | statistics_type = vtb::core::Statistics< T > |
using | Record = typename statistics_type::Record |
using | callback_type = std::function< void(testbed_type &)> |
using | gui_callback_type = std::function< void(testbed_gui_type &)> |
using | callback_array = std::vector< callback_type > |
using | gui_callback_array = std::vector< gui_callback_type > |
using | lock_type = std::lock_guard< mutex_type > |
Public Member Functions | |
void | start () |
void | stop () |
void | reset () |
void | wait () |
bool | initial () const |
bool | stopped () const |
bool | started () const |
void | testbed_gui (testbed_gui_type *rhs) |
testbed_gui_type * | testbed_gui () |
void | testbed (testbed_type &&rhs) |
testbed_type * | testbed () |
T | min_time_step () const |
void | min_time_step (T rhs) |
T | max_time_step () const |
void | max_time_step (T rhs) |
T | speed () const |
void | speed (T rhs) |
T | time_step () const |
void | fixed_time_step (bool rhs) |
bool | fixed_time_step () const |
T | frame_rate () const |
void | accumulate_dt (T dt) |
Accumulate FPS using exponential moving average. | |
template<class Callback > | |
void | call (Callback &&cb) |
Insert computational callback. More... | |
template<class Callback > | |
void | gui_call (Callback &&cb) |
Insert computational and graphical callbacks. More... | |
void | do_gui_callbacks () |
Definition at line 17 of file TestbedPipeline.hh.
|
inline |
Insert computational callback.
The callback will be called before the next computational step in the thread of the pipeline (a thread that computes everything). The argument to this function is non-constant reference to object, using which you can copy-in simulation parameters (e.g. change wavy surface size).
Definition at line 116 of file TestbedPipeline.hh.
|
inline |
Insert computational and graphical callbacks.
The callback will be called before the next rendering step in OpenGL thread. The argument to this function is non-constant reference to object using which you can copy-out simulation results (e.g. wavy surface) from the previous step.
Definition at line 132 of file TestbedPipeline.hh.