|
AGX Dynamics
2.37.2.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 () | |
| 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 () |
| agxOSG::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 () |
| void | incrementOrthographicProjection (agx::Real increment) |
| 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 | setCameraViewDirection (const agx::Vec3 &direction) |
| 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 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 |
| 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 366 of file QtAgxWrapper.h.
| agx::AnalysisBox * agxQt::QtAgxWrapper::getAnalysisBox | ( | ) |
Definition at line 380 of file QtAgxWrapper.h.
| agxQt::OsgCameraViewManager * agxQt::QtAgxWrapper::getCameraViewManager | ( | ) |
Get the camera view manager.
Definition at line 372 of file QtAgxWrapper.h.
| agxOSG::ClipPlane* agxQt::QtAgxWrapper::getClipPlane | ( | ) |
| agxQt::ClipPlaneController* agxQt::QtAgxWrapper::getClipPlaneController | ( | ) |
| agx::String agxQt::QtAgxWrapper::getCurrentSessionName | ( | ) | const |
| agxQt::ParticleSystemRenderUtility * agxQt::QtAgxWrapper::getParticleRenderUtillity | ( | ) |
Definition at line 374 of file QtAgxWrapper.h.
| agxOSG::RigidBodyRenderCache* agxQt::QtAgxWrapper::getRenderCache | ( | ) |
| agx::Vec2u agxQt::QtAgxWrapper::getRenderWindowSize | ( | ) | const |
Returns the size of the render window.
|
inline |
Definition at line 171 of file QtAgxWrapper.h.
| osg::Group * agxQt::QtAgxWrapper::getScene | ( | ) |
Definition at line 364 of file QtAgxWrapper.h.
| agxOSG::SceneDecorator * agxQt::QtAgxWrapper::getSceneDecorator | ( | ) |
Get Scene decorator.
Definition at line 356 of file QtAgxWrapper.h.
|
inline |
Returns the description of the active scene.
Definition at line 111 of file QtAgxWrapper.h.
References agx::root(), agxQt::VideoCapture::startCapture(), and agxQt::VideoCapture::stopCapture().
| agxSDK::Simulation * agxQt::QtAgxWrapper::getSimulation | ( | ) |
Definition at line 358 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 376 of file QtAgxWrapper.h.
| agxQt::VideoCapture* agxQt::QtAgxWrapper::getVideoCapture | ( | ) |
| osgViewer::Viewer * agxQt::QtAgxWrapper::getViewer | ( | ) |
Definition at line 354 of file QtAgxWrapper.h.
|
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 378 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 |
| 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 368 of file QtAgxWrapper.h.
| 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 360 of file QtAgxWrapper.h.
|
protected |
Definition at line 370 of file QtAgxWrapper.h.
| void agxQt::QtAgxWrapper::setTimeStep | ( | float | dt | ) |
Set the time step used in the simulation.
Definition at line 362 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 352 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 |
|
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 320 of file QtAgxWrapper.h.
|
protected |
Definition at line 321 of file QtAgxWrapper.h.
|
protected |
Definition at line 294 of file QtAgxWrapper.h.
|
protected |
Definition at line 312 of file QtAgxWrapper.h.
|
protected |
Definition at line 302 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 326 of file QtAgxWrapper.h.
|
protected |
Definition at line 300 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 340 of file QtAgxWrapper.h.
|
protected |
Definition at line 341 of file QtAgxWrapper.h.
|
protected |
Definition at line 304 of file QtAgxWrapper.h.
|
protected |
Definition at line 299 of file QtAgxWrapper.h.
|
protected |
Definition at line 298 of file QtAgxWrapper.h.
|
protected |
Definition at line 306 of file QtAgxWrapper.h.
|
protected |
Definition at line 315 of file QtAgxWrapper.h.
|
protected |
Definition at line 329 of file QtAgxWrapper.h.
|
protected |
Definition at line 335 of file QtAgxWrapper.h.
|
protected |
Definition at line 295 of file QtAgxWrapper.h.
|
protected |
Definition at line 343 of file QtAgxWrapper.h.
|
protected |
Definition at line 330 of file QtAgxWrapper.h.
|
protected |
Definition at line 334 of file QtAgxWrapper.h.
|
protected |
Definition at line 337 of file QtAgxWrapper.h.
|
protected |
Definition at line 293 of file QtAgxWrapper.h.
|
protected |
Definition at line 336 of file QtAgxWrapper.h.
|
protected |
Definition at line 338 of file QtAgxWrapper.h.
|
protected |
Definition at line 292 of file QtAgxWrapper.h.
|
protected |
Definition at line 290 of file QtAgxWrapper.h.
|
protected |
Definition at line 305 of file QtAgxWrapper.h.
|
protected |
Definition at line 339 of file QtAgxWrapper.h.
|
protected |
Definition at line 317 of file QtAgxWrapper.h.
|
protected |
Definition at line 348 of file QtAgxWrapper.h.
|
protected |
Definition at line 347 of file QtAgxWrapper.h.
|
protected |
Definition at line 309 of file QtAgxWrapper.h.
|
protected |
Definition at line 331 of file QtAgxWrapper.h.
|
staticprotected |
Definition at line 346 of file QtAgxWrapper.h.