|
AGX Dynamics 2.38.0.2
|
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 () | |
| void | addGLCameraSynchronizationtoPreCallback (osg::Camera *camera) |
| bool | attachScripts (osg::Group *root) |
| void | finalizeAndResetVideoCapture () |
| agx::AnalysisBox * | getAnalysisBox () |
| agxQt::MeasurementAxesController * | getAxesController () |
| agxQt::OsgCameraViewManager * | getCameraViewManager () |
| Get the camera view manager. | |
| agxOSG::ClipPlane * | getClipPlane () |
| agxQt::ClipPlaneController * | getClipPlaneController () |
| agx::String | getCurrentSessionName () const |
| agxQt::ParticleSystemRenderUtility * | getParticleRenderUtillity () |
| agxOSG::RigidBodyRenderCache * | getRenderCache () |
| agx::Vec2u | getRenderWindowSize () const |
| Returns the size of the render window. | |
| osg::Group * | getRoot () |
| osg::Group * | getScene () |
| agxOSG::SceneDecorator * | getSceneDecorator () |
| Get Scene decorator. | |
| agxOSG::SceneDescription | getSceneDescription () const |
| Returns the description of the active scene. | |
| agxSDK::Simulation * | getSimulation () |
| agx::Real | getSimulationUpdateTimeStep () |
| agx::TimeStamp | getTimeStamp () |
| Get the current timestamp of the simulation. | |
| agxQt::TrajectoryRenderer * | getTrajectoryRenderer () |
| agxQt::VideoCapture * | getVideoCapture () |
| osgViewer::Viewer * | getViewer () |
| void | incrementOrthographicProjection (agx::Real increment) |
| bool | init (osgViewer::Viewer *viewer, agxIO::ArgumentParser *arguments) |
| Init. | |
| bool | isSimulationRunning () const |
| bool | journalContainsImpactData () |
| bool | loadFile (const std::string &filename) |
| Loads a file into the wrapper. | |
| void | reloadActiveScene () |
| Reloads the active loaded scene. | |
| bool | saveSimulationState (const std::string &filename) |
| Save simulation state to file. | |
| void | setCameraViewDirection (const agx::Vec3 &direction) |
| void | setScene (osg::Group *scene) |
| Returns pointer to osg structure of the scene. | |
| void | setTimeStep (float dt) |
| Set the time step used in the simulation. | |
| void | setViewer (osgViewer::Viewer *viewer) |
| Set the viewer to sync the simulation content to. | |
| void | startCapture () |
| Image capturing for video. | |
| void | stopCapture () |
| void | takeScreenShot () |
| Take screenshot. | |
| bool | writeCameraViewsToFile (const std::string &filename) |
| Save the active camera view set to a file. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
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. | |
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. | |
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. | |
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 70 of file QtAgxWrapper.h.
| Enumerator | |
|---|---|
| GRAY_GRADIENT | |
| WHITE | |
| WHITE_GRADIENT | |
| SKY_BLUE | |
| LIGHT_BLUE | |
| BLACK | |
| NUM_COLORS | |
Definition at line 79 of file QtAgxWrapper.h.
| agxQt::QtAgxWrapper::QtAgxWrapper | ( | ) |
|
protectedvirtual |
| void agxQt::QtAgxWrapper::addGLCameraSynchronizationtoPreCallback | ( | osg::Camera * | camera | ) |
| bool agxQt::QtAgxWrapper::attachScripts | ( | osg::Group * | root | ) |
|
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 374 of file QtAgxWrapper.h.
References s_activeController.
| agx::AnalysisBox * agxQt::QtAgxWrapper::getAnalysisBox | ( | ) |
Definition at line 388 of file QtAgxWrapper.h.
References m_analysisBox.
| agxQt::MeasurementAxesController * agxQt::QtAgxWrapper::getAxesController | ( | ) |
| agxQt::OsgCameraViewManager * agxQt::QtAgxWrapper::getCameraViewManager | ( | ) |
Get the camera view manager.
Definition at line 380 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 382 of file QtAgxWrapper.h.
References agx::ref_ptr< T >::get(), and m_particleRenderUtil.
| agxOSG::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 372 of file QtAgxWrapper.h.
References m_scene.
| agxOSG::SceneDecorator * agxQt::QtAgxWrapper::getSceneDecorator | ( | ) |
|
inline |
Returns the description of the active scene.
Definition at line 111 of file QtAgxWrapper.h.
| agxSDK::Simulation * agxQt::QtAgxWrapper::getSimulation | ( | ) |
Definition at line 366 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 384 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 362 of file QtAgxWrapper.h.
References m_viewer.
|
protected |
|
protected |
|
protected |
| void agxQt::QtAgxWrapper::incrementOrthographicProjection | ( | agx::Real | increment | ) |
| bool agxQt::QtAgxWrapper::init | ( | osgViewer::Viewer * | viewer, |
| agxIO::ArgumentParser * | arguments | ||
| ) |
Init.
|
protected |
| bool agxQt::QtAgxWrapper::isSimulationRunning | ( | ) | const |
Definition at line 386 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 376 of file QtAgxWrapper.h.
References s_activeController.
| void agxQt::QtAgxWrapper::setCameraViewDirection | ( | const agx::Vec3 & | direction | ) |
|
protected |
|
slot |
| void agxQt::QtAgxWrapper::setScene | ( | osg::Group * | scene | ) |
Returns pointer to osg structure of the scene.
Definition at line 368 of file QtAgxWrapper.h.
References m_scene.
|
protected |
Definition at line 378 of file QtAgxWrapper.h.
References m_sceneDescription.
| void agxQt::QtAgxWrapper::setTimeStep | ( | float | dt | ) |
Set the time step used in the simulation.
Definition at line 370 of file QtAgxWrapper.h.
References m_simulationController, and agxSDK::Simulation::setTimeStep().
|
protected |
|
protected |
|
protected |
| void agxQt::QtAgxWrapper::setViewer | ( | osgViewer::Viewer * | viewer | ) |
Set the viewer to sync the simulation content to.
Definition at line 360 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 |
|
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 325 of file QtAgxWrapper.h.
Referenced by getAnalysisBox().
|
protected |
Definition at line 326 of file QtAgxWrapper.h.
|
protected |
Definition at line 299 of file QtAgxWrapper.h.
|
protected |
Definition at line 334 of file QtAgxWrapper.h.
|
protected |
Definition at line 333 of file QtAgxWrapper.h.
|
protected |
Definition at line 317 of file QtAgxWrapper.h.
Referenced by getCameraViewManager().
|
protected |
Definition at line 307 of file QtAgxWrapper.h.
|
protected |
Definition at line 329 of file QtAgxWrapper.h.
|
protected |
Definition at line 330 of file QtAgxWrapper.h.
|
protected |
Definition at line 331 of file QtAgxWrapper.h.
|
protected |
Definition at line 305 of file QtAgxWrapper.h.
|
protected |
Definition at line 340 of file QtAgxWrapper.h.
Referenced by getSceneDecorator().
|
protected |
Definition at line 341 of file QtAgxWrapper.h.
|
protected |
Definition at line 348 of file QtAgxWrapper.h.
|
protected |
Definition at line 349 of file QtAgxWrapper.h.
|
protected |
Definition at line 309 of file QtAgxWrapper.h.
|
protected |
Definition at line 304 of file QtAgxWrapper.h.
|
protected |
Definition at line 303 of file QtAgxWrapper.h.
|
protected |
Definition at line 311 of file QtAgxWrapper.h.
|
protected |
Definition at line 320 of file QtAgxWrapper.h.
Referenced by getParticleRenderUtillity().
|
protected |
Definition at line 337 of file QtAgxWrapper.h.
|
protected |
Definition at line 343 of file QtAgxWrapper.h.
|
protected |
Definition at line 300 of file QtAgxWrapper.h.
|
protected |
Definition at line 351 of file QtAgxWrapper.h.
|
protected |
Definition at line 338 of file QtAgxWrapper.h.
|
protected |
Definition at line 342 of file QtAgxWrapper.h.
|
protected |
Definition at line 345 of file QtAgxWrapper.h.
Referenced by getScene(), and setScene().
|
protected |
Definition at line 298 of file QtAgxWrapper.h.
Referenced by setSceneDescription().
|
protected |
Definition at line 344 of file QtAgxWrapper.h.
|
protected |
Definition at line 346 of file QtAgxWrapper.h.
|
protected |
Definition at line 297 of file QtAgxWrapper.h.
|
protected |
Definition at line 295 of file QtAgxWrapper.h.
Referenced by getSimulation(), and setTimeStep().
|
protected |
Definition at line 310 of file QtAgxWrapper.h.
Referenced by isSimulationRunning().
|
protected |
Definition at line 347 of file QtAgxWrapper.h.
|
protected |
Definition at line 322 of file QtAgxWrapper.h.
Referenced by getTrajectoryRenderer().
|
protected |
Definition at line 356 of file QtAgxWrapper.h.
|
protected |
Definition at line 355 of file QtAgxWrapper.h.
|
protected |
Definition at line 314 of file QtAgxWrapper.h.
|
protected |
Definition at line 339 of file QtAgxWrapper.h.
Referenced by getViewer(), and setViewer().
|
staticprotected |
Definition at line 354 of file QtAgxWrapper.h.
Referenced by getActiveSimulation(), and setActiveSimulationController().