|
AGX Dynamics
2.35.0.1
|
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 () | |
| 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 () |
| RigidBodyRenderCache * | getRenderCache () |
| agx::Vec2u | getRenderWindowSize () const |
| Returns the size of the render window. More... | |
| osg::Group * | getRoot () |
| 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... | |
| bool | isSimulationRunning () const |
| bool | journalContainsImpactData () |
| bool | loadFile (const std::string &filename) |
| Loads a file into the wrapper. 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... | |
| bool | writeCameraViewsToFile (const std::string &filename) |
| Save the active camera view set to a file. More... | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. More... | |
| Referenced (const Referenced &) | |
| 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 |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. 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 | 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... | |
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... | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Protected Member Functions | |
| 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 Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| 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 72 of file QtAgxWrapper.h.
| Enumerator | |
|---|---|
| GRAY_GRADIENT | |
| WHITE | |
| WHITE_GRADIENT | |
| SKY_BLUE | |
| LIGHT_BLUE | |
| BLACK | |
| NUM_COLORS | |
Definition at line 81 of file QtAgxWrapper.h.
| agxQt::QtAgxWrapper::QtAgxWrapper | ( | ) |
|
protectedvirtual |
| bool agxQt::QtAgxWrapper::attachScripts | ( | osg::Group * | root | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
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 362 of file QtAgxWrapper.h.
References s_activeController.
| agx::AnalysisBox * agxQt::QtAgxWrapper::getAnalysisBox | ( | ) |
Definition at line 376 of file QtAgxWrapper.h.
References m_analysisBox.
| agxQt::OsgCameraViewManager * agxQt::QtAgxWrapper::getCameraViewManager | ( | ) |
Get the camera view manager.
Definition at line 368 of file QtAgxWrapper.h.
References agx::ref_ptr< T >::get(), and m_cameraManager.
| agxOSG::ClipPlane* agxQt::QtAgxWrapper::getClipPlane | ( | ) |
| agxQt::ClipPlaneController* agxQt::QtAgxWrapper::getClipPlaneController | ( | ) |
| agx::String agxQt::QtAgxWrapper::getCurrentSessionName | ( | ) | const |
| agxQt::ParticleSystemRenderUtility * agxQt::QtAgxWrapper::getParticleRenderUtillity | ( | ) |
Definition at line 370 of file QtAgxWrapper.h.
References agx::ref_ptr< T >::get(), and m_particleRenderUtil.
| RigidBodyRenderCache* agxQt::QtAgxWrapper::getRenderCache | ( | ) |
| agx::Vec2u agxQt::QtAgxWrapper::getRenderWindowSize | ( | ) | const |
Returns the size of the render window.
|
inline |
Definition at line 173 of file QtAgxWrapper.h.
| osg::Group * agxQt::QtAgxWrapper::getScene | ( | ) |
Definition at line 360 of file QtAgxWrapper.h.
References m_scene.
| agxOSG::SceneDecorator * agxQt::QtAgxWrapper::getSceneDecorator | ( | ) |
|
inline |
Returns the description of the active scene.
Definition at line 113 of file QtAgxWrapper.h.
| agxSDK::Simulation * agxQt::QtAgxWrapper::getSimulation | ( | ) |
Definition at line 354 of file QtAgxWrapper.h.
References m_simulationController.
| 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 372 of file QtAgxWrapper.h.
References agx::ref_ptr< T >::get(), and m_trajectoryRenderer.
| agxQt::VideoCapture* agxQt::QtAgxWrapper::getVideoCapture | ( | ) |
| osgViewer::Viewer * agxQt::QtAgxWrapper::getViewer | ( | ) |
Definition at line 350 of file QtAgxWrapper.h.
References m_viewer.
|
protected |
|
protected |
|
protected |
| bool agxQt::QtAgxWrapper::init | ( | osgViewer::Viewer * | viewer, |
| agxIO::ArgumentParser * | arguments | ||
| ) |
Init.
|
protected |
| bool agxQt::QtAgxWrapper::isSimulationRunning | ( | ) | const |
Definition at line 374 of file QtAgxWrapper.h.
References m_simulationPaused.
| 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 |
| 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 364 of file QtAgxWrapper.h.
References s_activeController.
|
protected |
| void agxQt::QtAgxWrapper::setScene | ( | osg::Group * | scene | ) |
Returns pointer to osg structure of the scene.
Definition at line 356 of file QtAgxWrapper.h.
References m_scene.
|
protected |
Definition at line 366 of file QtAgxWrapper.h.
References m_sceneDescription.
| void agxQt::QtAgxWrapper::setTimeStep | ( | float | dt | ) |
Set the time step used in the simulation.
Definition at line 358 of file QtAgxWrapper.h.
References m_simulationController.
|
protected |
|
protected |
|
protected |
| void agxQt::QtAgxWrapper::setViewer | ( | osgViewer::Viewer * | viewer | ) |
Set the viewer to sync the simulation content to.
Definition at line 348 of file QtAgxWrapper.h.
References m_viewer.
|
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 |
|
slot |
| void agxQt::QtAgxWrapper::startCapture | ( | ) |
Image capturing for video.
|
slot |
| void agxQt::QtAgxWrapper::stopCapture | ( | ) |
| void agxQt::QtAgxWrapper::takeScreenShot | ( | ) |
Take screenshot.
|
protected |
|
protected |
| bool agxQt::QtAgxWrapper::writeCameraViewsToFile | ( | const std::string & | filename | ) |
Save the active camera view set to a file.
|
protected |
Definition at line 316 of file QtAgxWrapper.h.
Referenced by getAnalysisBox().
|
protected |
Definition at line 317 of file QtAgxWrapper.h.
|
protected |
Definition at line 289 of file QtAgxWrapper.h.
|
protected |
Definition at line 308 of file QtAgxWrapper.h.
Referenced by getCameraViewManager().
|
protected |
Definition at line 297 of file QtAgxWrapper.h.
|
protected |
Definition at line 320 of file QtAgxWrapper.h.
|
protected |
Definition at line 321 of file QtAgxWrapper.h.
|
protected |
Definition at line 322 of file QtAgxWrapper.h.
|
protected |
Definition at line 295 of file QtAgxWrapper.h.
|
protected |
Definition at line 328 of file QtAgxWrapper.h.
Referenced by getSceneDecorator().
|
protected |
Definition at line 329 of file QtAgxWrapper.h.
|
protected |
Definition at line 336 of file QtAgxWrapper.h.
|
protected |
Definition at line 337 of file QtAgxWrapper.h.
|
protected |
Definition at line 300 of file QtAgxWrapper.h.
|
protected |
Definition at line 294 of file QtAgxWrapper.h.
|
protected |
Definition at line 293 of file QtAgxWrapper.h.
|
protected |
Definition at line 302 of file QtAgxWrapper.h.
|
protected |
Definition at line 298 of file QtAgxWrapper.h.
|
protected |
Definition at line 311 of file QtAgxWrapper.h.
Referenced by getParticleRenderUtillity().
|
protected |
Definition at line 325 of file QtAgxWrapper.h.
|
protected |
Definition at line 331 of file QtAgxWrapper.h.
|
protected |
Definition at line 290 of file QtAgxWrapper.h.
|
protected |
Definition at line 339 of file QtAgxWrapper.h.
|
protected |
Definition at line 326 of file QtAgxWrapper.h.
|
protected |
Definition at line 330 of file QtAgxWrapper.h.
|
protected |
Definition at line 333 of file QtAgxWrapper.h.
Referenced by getScene(), and setScene().
|
protected |
Definition at line 288 of file QtAgxWrapper.h.
Referenced by setSceneDescription().
|
protected |
Definition at line 332 of file QtAgxWrapper.h.
|
protected |
Definition at line 334 of file QtAgxWrapper.h.
|
protected |
Definition at line 287 of file QtAgxWrapper.h.
|
protected |
Definition at line 285 of file QtAgxWrapper.h.
Referenced by getSimulation(), and setTimeStep().
|
protected |
Definition at line 301 of file QtAgxWrapper.h.
Referenced by isSimulationRunning().
|
protected |
Definition at line 335 of file QtAgxWrapper.h.
|
protected |
Definition at line 313 of file QtAgxWrapper.h.
Referenced by getTrajectoryRenderer().
|
protected |
Definition at line 344 of file QtAgxWrapper.h.
|
protected |
Definition at line 343 of file QtAgxWrapper.h.
|
protected |
Definition at line 305 of file QtAgxWrapper.h.
|
protected |
Definition at line 327 of file QtAgxWrapper.h.
Referenced by getViewer(), and setViewer().
|
staticprotected |
Definition at line 342 of file QtAgxWrapper.h.
Referenced by getActiveSimulation(), and setActiveSimulationController().