|
AGXDynamics
2.31.1.0
|
Class that wraps SimulationController with an interface that enables QT Gui signals to control the simulation controller and it's contents. More...
#include <QtAgxWrapper.h>
Inheritance diagram for agxQt::QtAgxWrapper:Public Types | |
| enum | BACKGROUND_COLOR { GRAY_GRADIENT =0, WHITE =1, WHITE_GRADIENT =2, SKY_BLUE =3, LIGHT_BLUE = 4, BLACK =5, NUM_COLORS =6 } |
Signals | |
| void | signalActiveCameraViewChanged () |
| void | signalJournalContainsImpactData (bool hasData) |
| void | signalJournalTrackReachedEnd () |
| void | signalNewPlayback (float timeStart, float timeEnd, uint numFrames) |
| void | signalNewSimulation () |
| void | signalNewSimulationLoaded () |
| void | signalRenderUpdate () |
| void | signalSimulationPause () |
| void | signalSimulationUpdate (float timeStamp) |
| void | signalUpdateSimulationStructure () |
Public Member Functions | |
| QtAgxWrapper () | |
| template<typename T > | |
| T * | as () |
| Subclass casting. More... | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| bool | attachScripts (osg::Group *root) |
| void | finalizeAndResetVideoCapture () |
| agx::AnalysisBox * | getAnalysisBox () |
| agxQt::OsgCameraViewManager * | getCameraViewManager () |
| Get the camera view manager. More... | |
| agxOSG::ClipPlane * | getClipPlane () |
| agxQt::ClipPlaneController * | getClipPlaneController () |
| agx::String | getCurrentSessionName () const |
| agxQt::ParticleSystemRenderUtility * | getParticleRenderUtillity () |
| int | getReferenceCount () const |
| agx::Vec2u | getRenderWindowSize () const |
| Returns the size of the render window. More... | |
| osg::Group * | getScene () |
| agxOSG::SceneDecorator * | getSceneDecorator () |
| Get Scene decorator. More... | |
| agxOSG::SceneDescription | getSceneDescription () const |
| Returns the description of the active scene. More... | |
| agxSDK::Simulation * | getSimulation () |
| agx::Real | getSimulationUpdateTimeStep () |
| agx::TimeStamp | getTimeStamp () |
| Get the current timestamp of the simulation. More... | |
| agxQt::TrajectoryRenderer * | getTrajectoryRenderer () |
| agxQt::VideoCapture * | getVideoCapture () |
| osgViewer::Viewer * | getViewer () |
| bool | init (osgViewer::Viewer *viewer, agxIO::ArgumentParser *arguments) |
| Init. More... | |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isSimulationRunning () const |
| bool | journalContainsImpactData () |
| bool | loadFile (const std::string &filename) |
| Loads a file into the wrapper. More... | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | reloadActiveScene () |
| Reloads the active loaded scene. More... | |
| bool | saveSimulationState (const std::string &filename) |
| Save simulation state to file. More... | |
| void | setScene (osg::Group *scene) |
| Returns pointer to osg structure of the scene. More... | |
| void | setTimeStep (float dt) |
| Set the time step used in the simulation. More... | |
| void | setViewer (osgViewer::Viewer *viewer) |
| Set the viewer to sync the simulation content to. More... | |
| void | startCapture () |
| Image capturing for video. More... | |
| void | stopCapture () |
| void | takeScreenShot () |
| Take screenshot. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| bool | writeCameraViewsToFile (const std::string &filename) |
| Save the active camera view set to a file. More... | |
Static Public Member Functions | |
| static agxSDK::SimulationController * | getActiveSimulation () |
| Returns the active simulation in the wrapper. This is kind of a "hack" to let the renderer get a simulation lock to sync rendering with stepping. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setActiveSimulationController (agxSDK::SimulationController *controller) |
| Static helper function to get active simulation controller so that other classes can lock the active simulation. The osg renderer is such an example. More... | |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Static Protected Attributes | |
| static agxSDK::SimulationController * | s_activeController |
Class that wraps SimulationController with an interface that enables QT Gui signals to control the simulation controller and it's contents.
Definition at line 71 of file QtAgxWrapper.h.
| Enumerator | |
|---|---|
| GRAY_GRADIENT | |
| WHITE | |
| WHITE_GRADIENT | |
| SKY_BLUE | |
| LIGHT_BLUE | |
| BLACK | |
| NUM_COLORS | |
Definition at line 80 of file QtAgxWrapper.h.
| agxQt::QtAgxWrapper::QtAgxWrapper | ( | ) |
|
protectedvirtual |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| bool agxQt::QtAgxWrapper::attachScripts | ( | osg::Group * | root | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
| void agxQt::QtAgxWrapper::finalizeAndResetVideoCapture | ( | ) |
|
protected |
|
static |
Returns the active simulation in the wrapper. This is kind of a "hack" to let the renderer get a simulation lock to sync rendering with stepping.
Definition at line 356 of file QtAgxWrapper.h.
| agx::AnalysisBox * agxQt::QtAgxWrapper::getAnalysisBox | ( | ) |
Definition at line 370 of file QtAgxWrapper.h.
| agxQt::OsgCameraViewManager * agxQt::QtAgxWrapper::getCameraViewManager | ( | ) |
Get the camera view manager.
Definition at line 362 of file QtAgxWrapper.h.
| agxOSG::ClipPlane* agxQt::QtAgxWrapper::getClipPlane | ( | ) |
| agxQt::ClipPlaneController* agxQt::QtAgxWrapper::getClipPlaneController | ( | ) |
| agx::String agxQt::QtAgxWrapper::getCurrentSessionName | ( | ) | const |
|
staticprotectedinherited |
| agxQt::ParticleSystemRenderUtility * agxQt::QtAgxWrapper::getParticleRenderUtillity | ( | ) |
Definition at line 364 of file QtAgxWrapper.h.
|
inherited |
| agx::Vec2u agxQt::QtAgxWrapper::getRenderWindowSize | ( | ) | const |
Returns the size of the render window.
| osg::Group * agxQt::QtAgxWrapper::getScene | ( | ) |
Definition at line 354 of file QtAgxWrapper.h.
| agxOSG::SceneDecorator * agxQt::QtAgxWrapper::getSceneDecorator | ( | ) |
Get Scene decorator.
Definition at line 346 of file QtAgxWrapper.h.
|
inline |
Returns the description of the active scene.
Definition at line 112 of file QtAgxWrapper.h.
References agx::root(), agxQt::VideoCapture::startCapture(), and agxQt::VideoCapture::stopCapture().
| agxSDK::Simulation * agxQt::QtAgxWrapper::getSimulation | ( | ) |
Definition at line 348 of file QtAgxWrapper.h.
| agx::Real agxQt::QtAgxWrapper::getSimulationUpdateTimeStep | ( | ) |
| agx::TimeStamp agxQt::QtAgxWrapper::getTimeStamp | ( | ) |
Get the current timestamp of the simulation.
| agxQt::TrajectoryRenderer * agxQt::QtAgxWrapper::getTrajectoryRenderer | ( | ) |
Definition at line 366 of file QtAgxWrapper.h.
| agxQt::VideoCapture* agxQt::QtAgxWrapper::getVideoCapture | ( | ) |
| osgViewer::Viewer * agxQt::QtAgxWrapper::getViewer | ( | ) |
Definition at line 344 of file QtAgxWrapper.h.
|
protected |
|
protected |
|
protected |
| bool agxQt::QtAgxWrapper::init | ( | osgViewer::Viewer * | viewer, |
| agxIO::ArgumentParser * | arguments | ||
| ) |
Init.
|
protected |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
| bool agxQt::QtAgxWrapper::isSimulationRunning | ( | ) | const |
Definition at line 368 of file QtAgxWrapper.h.
| bool agxQt::QtAgxWrapper::journalContainsImpactData | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| bool agxQt::QtAgxWrapper::loadFile | ( | const std::string & | filename | ) |
Loads a file into the wrapper.
|
protected |
|
protected |
|
protected |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
| void agxQt::QtAgxWrapper::reloadActiveScene | ( | ) |
Reloads the active loaded scene.
|
protected |
| bool agxQt::QtAgxWrapper::saveSimulationState | ( | const std::string & | filename | ) |
Save simulation state to file.
|
staticprotected |
Static helper function to get active simulation controller so that other classes can lock the active simulation. The osg renderer is such an example.
Definition at line 358 of file QtAgxWrapper.h.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
protected |
| void agxQt::QtAgxWrapper::setScene | ( | osg::Group * | scene | ) |
Returns pointer to osg structure of the scene.
Definition at line 350 of file QtAgxWrapper.h.
|
protected |
Definition at line 360 of file QtAgxWrapper.h.
| void agxQt::QtAgxWrapper::setTimeStep | ( | float | dt | ) |
Set the time step used in the simulation.
Definition at line 352 of file QtAgxWrapper.h.
|
protected |
|
protected |
|
protected |
| void agxQt::QtAgxWrapper::setViewer | ( | osgViewer::Viewer * | viewer | ) |
Set the viewer to sync the simulation content to.
Definition at line 342 of file QtAgxWrapper.h.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
| void agxQt::QtAgxWrapper::startCapture | ( | ) |
Image capturing for video.
|
slot |
| void agxQt::QtAgxWrapper::stopCapture | ( | ) |
| void agxQt::QtAgxWrapper::takeScreenShot | ( | ) |
Take screenshot.
|
protected |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
protected |
|
staticinherited |
| bool agxQt::QtAgxWrapper::writeCameraViewsToFile | ( | const std::string & | filename | ) |
Save the active camera view set to a file.
|
protected |
Definition at line 312 of file QtAgxWrapper.h.
|
protected |
Definition at line 313 of file QtAgxWrapper.h.
|
protected |
Definition at line 285 of file QtAgxWrapper.h.
|
protected |
Definition at line 304 of file QtAgxWrapper.h.
|
protected |
Definition at line 293 of file QtAgxWrapper.h.
|
protected |
Definition at line 316 of file QtAgxWrapper.h.
|
protected |
Definition at line 317 of file QtAgxWrapper.h.
|
protected |
Definition at line 318 of file QtAgxWrapper.h.
|
protected |
Definition at line 291 of file QtAgxWrapper.h.
|
protected |
Definition at line 324 of file QtAgxWrapper.h.
|
protected |
Definition at line 325 of file QtAgxWrapper.h.
|
protected |
Definition at line 332 of file QtAgxWrapper.h.
|
protected |
Definition at line 333 of file QtAgxWrapper.h.
|
protected |
Definition at line 296 of file QtAgxWrapper.h.
|
protected |
Definition at line 290 of file QtAgxWrapper.h.
|
protected |
Definition at line 289 of file QtAgxWrapper.h.
|
protected |
Definition at line 298 of file QtAgxWrapper.h.
|
protected |
Definition at line 294 of file QtAgxWrapper.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protected |
Definition at line 307 of file QtAgxWrapper.h.
|
protected |
Definition at line 321 of file QtAgxWrapper.h.
|
protected |
Definition at line 327 of file QtAgxWrapper.h.
|
protected |
Definition at line 286 of file QtAgxWrapper.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protected |
Definition at line 322 of file QtAgxWrapper.h.
|
protected |
Definition at line 326 of file QtAgxWrapper.h.
|
protected |
Definition at line 329 of file QtAgxWrapper.h.
|
protected |
Definition at line 284 of file QtAgxWrapper.h.
|
protected |
Definition at line 328 of file QtAgxWrapper.h.
|
protected |
Definition at line 330 of file QtAgxWrapper.h.
|
protected |
Definition at line 283 of file QtAgxWrapper.h.
|
protected |
Definition at line 281 of file QtAgxWrapper.h.
|
protected |
Definition at line 297 of file QtAgxWrapper.h.
|
protected |
Definition at line 331 of file QtAgxWrapper.h.
|
protected |
Definition at line 309 of file QtAgxWrapper.h.
|
protected |
Definition at line 338 of file QtAgxWrapper.h.
|
protected |
Definition at line 337 of file QtAgxWrapper.h.
|
protected |
Definition at line 301 of file QtAgxWrapper.h.
|
protected |
Definition at line 323 of file QtAgxWrapper.h.
|
staticprotected |
Definition at line 336 of file QtAgxWrapper.h.