|
AGX Dynamics 2.42.0.2
|
Class that encapsulates rendering and simulation using OpenSceneGraph. More...
#include <ExampleApplication.h>
Inheritance diagram for agxOSG::ExampleApplication:Public Types | |
| typedef agx::Event1< bool > | AutoStepEvent |
| enum | CameraMask { MAIN_SCENE_MASK = 1 << 1 , DEBUG_RENDER_MASK = 1 << 2 , OSG_RENDER_MASK = 1 << 3 , HUD_MASK = 1 << 4 , DECORATOR_MASK = 1 << 5 , CASTS_SHADOWS_MASK = 1 << 6 , RECIEVES_SHADOWS_MASK = 1 << 7 } |
| Specifies node masks for different parts of the rendering scene. More... | |
| enum | SolverType { MULTI , ITERATIVE , NUM_SOLVERS } |
Public Member Functions | |
| ExampleApplication (agxSDK::Simulation *simulation=nullptr) | |
| Constructor. | |
| void | addAutoPausePair (const agx::RigidBody *body1, const agx::RigidBody *body2) |
| Add/remove a pair of bodies/geometries that when colliding will cause the simulation to pause. | |
| void | addAutoPausePair (const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2) |
| void | addListener (ExampleApplicationListener *listener) |
| void | addRenderTarget (agxOSG::RenderTarget *rtt, osg::Node *targetSceneNode=nullptr) |
| Add a render target to the current viewer. | |
| bool | addScene (BuildScenePtr sceneFunction, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false) |
| bool | addScene (BuildScenePtr sceneFunction, int key, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false) |
| bool | addScene (const std::string &scriptFile, const std::string &scriptFunction, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false) |
| bool | addScene (const std::string &scriptFile, const std::string &scriptFunction, int key, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false) |
| bool | addScene (SceneDescription sceneDescription) |
| bool | addScene (SceneDescription sceneDescription, int key) |
| void | applyCameraData (const agxOSG::CameraData &cameraData) |
| Apply camera data. | |
| bool | breakRequested () const |
| void | cancelStop () |
| Will cancel the stop if possible. Continue the run loop. | |
| void | centerScene () |
| void | changeSolver () |
| void | clearAddedScenes () |
| Remove all added scenes. | |
| void | clearScene () |
| bool | coSimulationCallPython (agxNet::CoSimulationServer *server) |
| void | createNextScene () |
| void | createPreviousScene () |
| bool | createSceneFromIndex (int idx, bool firstStartUp=false) |
| bool | createSceneFromKey (int key) |
| void | createVisual (agxSDK::Assembly *assembly, float detailRatio=1.0f, bool createAxes=false) |
| void | createVisual (agxSDK::Simulation *simulation, float detailRatio=1.0f, bool createAxes=false) |
| bool | done () const |
| If no graphics is used, this method always return false. | |
| bool | executeOneStepWithGraphics (agx::HighAccuracyTimer &timer) |
This method will take a whole step in AGX, update graphics (but only if target FPS is met based on elapsed time for timer). | |
| bool | executeOneStepWithoutGraphics () |
| osg::Group * | executePythonScript (const agx::String &file, const agx::String &function, bool &success) |
Execute a python script file with a named function. | |
| void | fitSceneIntoView () |
| bool | getAllowWindowResizing () const |
| Is window resizing allowed? | |
| agxIO::ArgumentParser * | getArguments () |
| bool | getAutoStepping () const |
| Should the application step automatically? False for 'pause', true for 'play'. | |
| SceneDescription | getCallback (int key) |
| SceneDescription | getCallbackIdx (size_t idx) |
| osg::Camera * | getCamera () |
| agxOSG::CameraData | getCameraData () const |
| void | getCameraHome (agx::Vec3 &eye, agx::Vec3 ¢er, agx::Vec3 &up) |
| osgGA::MatrixManipulator * | getCameraManipulator () |
| const osgGA::MatrixManipulator * | getCameraManipulator () const |
| agx::AffineMatrix4x4 | getCoordinateSystemTransform () const |
| Gets the transformation for the visual coordinate system and grid. | |
| bool | getEnableAutoPausing () |
| bool | getEnableCaptureSyncWithSimulation () const |
| bool | getEnableCoordinateSystem () const |
| Is the visual coordinate system enabled/disabled? | |
| bool | getEnableDebugRenderer () const |
| Is the debug renderer enabled? Will also return false if no simulation exists. | |
| bool | getEnableGrid () const |
| Is the visual grid enabled/disabled? | |
| bool | getEnableJournalIncrementalStructure () const |
| bool | getEnableOSGRenderer () |
| bool | getEnablePauseUpdate () const |
| bool | getEnableSimulationDump () const |
| bool | getEnableTextDebugRendering () const |
| bool | getEnableVSync () const |
| int | getExitCode () |
| agx::Mutex & | getFrameMutex () |
| agx::Vec3 | getGravity () const |
| agx::Vec2u | getGridResolution () const |
| Gets the grid resolution for the visual grid. | |
| agx::Vec2 | getGridSize () const |
| Gets the grid size for the visual grid. | |
| intptr_t | getHWND () const |
| agxOSG::ImageCapture * | getImageCapture () |
| const agxOSG::ImageCapture * | getImageCapture () const |
| agx::Journal * | getJournal () |
| const std::string & | getJournalConfigurationPath () const |
| agx::UInt | getJournalFormat () const |
| Gets journal format. | |
| const std::string & | getJournalPlaybackPath () const |
| size_t | getNumScenes () const |
| PickHandler * | getPickHandler () |
| const PickHandler * | getPickHandler () const |
| std::string | getProfilingJournalPath () const |
| bool | getQuitEventSetsDone () const |
| bool | getRealTimeSync () const |
| agxOSG::RenderProxyFactory * | getRenderProxyFactory () |
| osg::Group * | getRoot () |
| const std::string & | getSaveSceneFilename () const |
| osg::Group * | getScene () |
| osg::Group * | getSceneAgxOSGRoot () |
| agxOSG::SceneDecorator * | getSceneDecorator () |
| osg::Group * | getSceneRoot () |
| osg::Group * | getSceneSwitch () |
| std::string | getScriptFile () const |
| agxSDK::Simulation * | getSimulation () |
| std::string | getSolverName (SolverType t) const |
| SolverType | getSolverType () const |
| SolverType | getSolverType (const std::string &name) const |
| agx::Callback | getStepCallback () const |
| double | getTargetFPS () |
| Retrieve current number of graphic window updates per second, if <= 0 no throttling is done. | |
| osg::Camera * | getTextureCamera () |
| agx::Real | getTimeStamp () const |
| agx::Real | getTimeStep () const |
| agxOSG::RenderToTexture * | getVideoCaptureRendertoTexture () |
| agxOSG::VideoFFMPEGPipeCapture * | getVideoServerCapture () |
| agx::Vec3 | getViewDirection () |
| osgViewer::Viewer * | getViewer () |
| void | handleReactiveScriptErrors (bool abortSimulation=true) |
| bool | hasOffscreenWindow () const |
| bool | hasRenderContext () const |
| This is will return false if -a / –agxOnly is specified. | |
| bool | init (agxIO::ArgumentParser *arguments, bool agxOnly=false) |
| bool | init (int argc, char **argv) |
| void | initAppendJournal () |
| void | initGraphics () |
| bool | initialized () const |
| void | initRecordJournal () |
| void | initRpc () |
| void | initScene () |
| void | initScene (osg::Group *root) |
| void | initSimulation (agxSDK::Simulation *simulation=nullptr, bool initializeGraphics=true) |
| void | initViewer (int width, int height, bool osgWindow=true) |
| bool | isCameraHomeSet () const |
| void | journalPlayback () |
| void | journalRenderLoader (agxSDK::Assembly *assembly, bool keyFrame) |
| void | listSessionNames (const std::string &journalToList) |
| void | postExecution () |
| void | reloadScene () |
| void | removeAutoPausePair (const agx::RigidBody *body1, const agx::RigidBody *body2) |
| void | removeAutoPausePair (const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2) |
| bool | removeRenderTarget (agxOSG::RenderTarget *rtt) |
| Remove a specified renderTarget. | |
| bool | restoreFromFile (const std::string &filename) |
| virtual int | run () |
| void | setAllowWindowResizing (bool flag) |
| Set if window resizing should be allowed. | |
| void | setAutoStepping (bool flag, bool resetTimer=true) |
| Should the application step automatically? False for 'pause', true for 'play'. | |
| void | setCameraHome (const agx::Vec3 &eye, const agx::Vec3 ¢er, const agx::Vec3 &up=agx::Vec3(0, 0, 1)) |
| void | setCoordinateSystemTransform (const agx::AffineMatrix4x4 &coordinateSystemTransform) |
| Sets the transformation for the visual coordinate system and grid. | |
| void | setDebugRenderInverseMatrix (const agx::AffineMatrix4x4 &m) |
| Transform the debug rendering AND pick handler origin by this matrix. | |
| void | setEnableAutoPausing (bool flag) |
| Enable/disable auto-pausing. | |
| void | setEnableCaptureSyncWithSimulation (bool enableSync) |
| void | setEnableCoordinateSystem (bool flag) |
| Enables/disables the visual coordinate system. | |
| bool | setEnableDebugRenderer (bool flag) |
| Set enabling the debug renderer. | |
| void | setEnableGrid (bool flag) |
| Enables/disables the visual grid. | |
| void | setEnableJournal32bitMode (bool enable) |
| Set to true if journal should save data in 32bit float. | |
| void | setEnableJournalIncrementalStructure (bool enable) |
| void | setEnableJournalRecord (bool enable) |
| Set if a journal should be recorded from the simulation. | |
| void | setEnableOSGRenderer (bool flag) |
| void | setEnablePauseUpdate (bool flag) |
| void | setEnableSimulationDump (bool flag) |
| void | setEnableTaskProfile (bool flag) |
| void | setEnableTextDebugRendering (bool flag) |
| void | setEnableThreadTimeline (bool flag) |
| void | setEnableVSync (bool flag, bool forceUpdate=false) |
| void | setGridResolution (const agx::Vec2u gridResolution) |
| Sets the grid resolution for the visual grid. | |
| void | setGridSize (const agx::Vec2 &gridSize) |
| Sets the grid size for the visual grid. | |
| void | setJournalConfigurationPath (const agx::String &path) |
| void | setJournalFormat (agx::UInt journalFormat) |
| Sets journal format. Only valid before starting journal recording/playback. | |
| void | setJournalRecordPath (const agx::String &journalPath) |
| Set the path for the recorded journal. | |
| void | setOrbitCamera (agxOSG::GeometryNode *node, const agx::Vec3 &eye, const agx::Vec3 ¢er, const agx::Vec3 &up=agx::Vec3::Z_AXIS(), int trackerMode=0) |
| Sets an orbit camera following an node. | |
| void | setOrbitCamera (agxOSG::GeometryNode *node, double heading, double elevation, double distance, int trackerMode=0) |
| Sets an orbit camera following an node. | |
| void | setOsgNotifyLevel (osg::NotifySeverity severity) const |
| void | setQuitEventSetsDone (bool flag) |
| If set to true (default) pressing the ESC key will exit the run loop and application will shut down. | |
| void | setRealTimeSync (bool flag) |
| Should ExampleApplication try to hold simulation in real time? Will wait for wall clock if going to fast, but might still go too slow if simulation or rendering time take too long. | |
| void | setRequestedJournalFrequency (agx::Real freq) |
| Set the requested recording frequency for attached journal. | |
| void | setScene (osg::Group *scene) |
| void | setSolverType (SolverType t) |
| void | setStepCallback (agx::Callback callback) |
| void | setTargetFPS (double fps) |
| Specify number of graphic window updates per second. | |
| void | setTimeStep (agx::Real dt) |
| void | setupImageCaptureRenderToTexture () |
| void | setupVideoCaptureRenderTotexture () |
| virtual void | setupViewer (bool lightingEnabled=true, bool visibleWindow=true) |
| bool | setWindowRectangle (unsigned int x, unsigned int y, unsigned int width, unsigned int height) |
| Set the position and size of the window. | |
| bool | setWindowTitle (const std::string &title) |
| Set the title of the window. | |
| bool | shouldStop () const |
| void | step () |
| void | stepSimulation () |
| void | stepWrapper () |
| void | stop (int exitCode=0) |
| Stop (=exit) the application at next opportunity. | |
| void | stopAfter (const agx::Real stopTime) |
| Lets the application stop after a certain simulation time. | |
| void | storeInitialJournalState () |
| void | synchronizedStep (bool blocking=false) |
| void | takeScreenShot (const agx::String &filename="") |
| Takes a screen shot of the scene. | |
| void | throttleIdleCpuUsageBySleeping () |
| void | updateCoSimulationServer () |
| bool | updatePythonCoSimulationServer (const agx::String &filename, std::stringstream &buffer) |
| void | updateRemoteDebugger () |
| void | updateServices () |
| bool | useCoSimulation () const |
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 void | registerRemovedGeometry (GeometryNode *node) |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes | |
| AutoStepEvent | autoStepEvent |
| std::string | m_hostName |
| bool | m_isFMU |
| bool | m_isLoadingScene |
| bool | m_loadedSceneFile |
| agx::Event | m_sceneLoadEvent |
Protected Types | |
| typedef agx::HashTable< int, int > | KeyBindings |
| typedef agx::Vector< SceneDescription > | KeyBindingsVector |
Additional Inherited Members | |
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. | |
Class that encapsulates rendering and simulation using OpenSceneGraph.
Definition at line 332 of file ExampleApplication.h.
| typedef agx::Event1<bool> agxOSG::ExampleApplication::AutoStepEvent |
Definition at line 335 of file ExampleApplication.h.
|
protected |
Definition at line 967 of file ExampleApplication.h.
|
protected |
Definition at line 969 of file ExampleApplication.h.
Specifies node masks for different parts of the rendering scene.
Makes it possible to later disable rendering of certain parts for different cameras. For example the HUD should not be rendered to RenderTargets (sensor cameras) by default.
| Enumerator | |
|---|---|
| MAIN_SCENE_MASK | |
| DEBUG_RENDER_MASK | |
| OSG_RENDER_MASK | |
| HUD_MASK | |
| DECORATOR_MASK | |
| CASTS_SHADOWS_MASK | |
| RECIEVES_SHADOWS_MASK | |
Definition at line 343 of file ExampleApplication.h.
| Enumerator | |
|---|---|
| MULTI | |
| ITERATIVE | |
| NUM_SOLVERS | |
Definition at line 354 of file ExampleApplication.h.
| agxOSG::ExampleApplication::ExampleApplication | ( | agxSDK::Simulation * | simulation = nullptr | ) |
Constructor.
|
protectedvirtual |
| void agxOSG::ExampleApplication::addAutoPausePair | ( | const agx::RigidBody * | body1, |
| const agx::RigidBody * | body2 | ||
| ) |
Add/remove a pair of bodies/geometries that when colliding will cause the simulation to pause.
| void agxOSG::ExampleApplication::addAutoPausePair | ( | const agxCollide::Geometry * | geometry1, |
| const agxCollide::Geometry * | geometry2 | ||
| ) |
|
protected |
| void agxOSG::ExampleApplication::addListener | ( | ExampleApplicationListener * | listener | ) |
| void agxOSG::ExampleApplication::addRenderTarget | ( | agxOSG::RenderTarget * | rtt, |
| osg::Node * | targetSceneNode = nullptr |
||
| ) |
Add a render target to the current viewer.
This can be used to add an additional camera which renders to a texture.
| rtt | - The RenderTarget to be added to the viewer |
| targetSceneNode | - If specified, this will be the part of the scene which is rendered to the target. Default is getSceneDecorator() |
| bool agxOSG::ExampleApplication::addScene | ( | BuildScenePtr | sceneFunction, |
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = -1, |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | BuildScenePtr | sceneFunction, |
| int | key, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = -1, |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | const std::string & | scriptFile, |
| const std::string & | scriptFunction, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = -1, |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | const std::string & | scriptFile, |
| const std::string & | scriptFunction, | ||
| int | key, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = -1, |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | SceneDescription | sceneDescription | ) |
| bool agxOSG::ExampleApplication::addScene | ( | SceneDescription | sceneDescription, |
| int | key | ||
| ) |
| void agxOSG::ExampleApplication::applyCameraData | ( | const agxOSG::CameraData & | cameraData | ) |
Apply camera data.
Typically: camData = app->getCameraData(); camData.nearClippingPlane = 0.01f; app->applyCameraData( camData );
|
protected |
|
protected |
| bool agxOSG::ExampleApplication::breakRequested | ( | ) | const |
|
protected |
|
inline |
Will cancel the stop if possible. Continue the run loop.
Definition at line 448 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::centerScene | ( | ) |
| void agxOSG::ExampleApplication::changeSolver | ( | ) |
|
inline |
Remove all added scenes.
Definition at line 410 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::clearScene | ( | ) |
| bool agxOSG::ExampleApplication::coSimulationCallPython | ( | agxNet::CoSimulationServer * | server | ) |
| void agxOSG::ExampleApplication::createNextScene | ( | ) |
| void agxOSG::ExampleApplication::createPreviousScene | ( | ) |
|
protected |
| bool agxOSG::ExampleApplication::createSceneFromIndex | ( | int | idx, |
| bool | firstStartUp = false |
||
| ) |
| bool agxOSG::ExampleApplication::createSceneFromKey | ( | int | key | ) |
| void agxOSG::ExampleApplication::createVisual | ( | agxSDK::Assembly * | assembly, |
| float | detailRatio = 1.0f, |
||
| bool | createAxes = false |
||
| ) |
| void agxOSG::ExampleApplication::createVisual | ( | agxSDK::Simulation * | simulation, |
| float | detailRatio = 1.0f, |
||
| bool | createAxes = false |
||
| ) |
| bool agxOSG::ExampleApplication::done | ( | ) | const |
If no graphics is used, this method always return false.
|
protected |
|
protected |
|
protected |
|
protected |
| bool agxOSG::ExampleApplication::executeOneStepWithGraphics | ( | agx::HighAccuracyTimer & | timer | ) |
This method will take a whole step in AGX, update graphics (but only if target FPS is met based on elapsed time for timer).
| timer | - Timer that will be used to determine if it is time to update the Graphics to meet the target FPS. |
|
protected |
| bool agxOSG::ExampleApplication::executeOneStepWithoutGraphics | ( | ) |
|
protected |
| osg::Group * agxOSG::ExampleApplication::executePythonScript | ( | const agx::String & | file, |
| const agx::String & | function, | ||
| bool & | success | ||
| ) |
Execute a python script file with a named function.
This function will load the python script, if that can be done without errors, the named function will be called. This can be used for building models in Python which are then accessed from C++ through named constraints, bodies etc. This function is called whenever agxViewer application load a .agxPy file and the buildScene() function is called.
| file | - Full path to python script |
| function | name of function (without any parameters) that should be executed. |
| success | - if executing the named function in the specified script is successful this variable will be set to true otherwise false. |
|
protected |
|
protected |
|
protected |
| void agxOSG::ExampleApplication::fitSceneIntoView | ( | ) |
|
protected |
|
protected |
| bool agxOSG::ExampleApplication::getAllowWindowResizing | ( | ) | const |
Is window resizing allowed?
|
inline |
Definition at line 393 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::getAutoStepping | ( | ) | const |
Should the application step automatically? False for 'pause', true for 'play'.
| SceneDescription agxOSG::ExampleApplication::getCallback | ( | int | key | ) |
| SceneDescription agxOSG::ExampleApplication::getCallbackIdx | ( | size_t | idx | ) |
|
inline |
Definition at line 630 of file ExampleApplication.h.
| agxOSG::CameraData agxOSG::ExampleApplication::getCameraData | ( | ) | const |
| void agxOSG::ExampleApplication::getCameraHome | ( | agx::Vec3 & | eye, |
| agx::Vec3 & | center, | ||
| agx::Vec3 & | up | ||
| ) |
| osgGA::MatrixManipulator * agxOSG::ExampleApplication::getCameraManipulator | ( | ) |
| const osgGA::MatrixManipulator * agxOSG::ExampleApplication::getCameraManipulator | ( | ) | const |
| agx::AffineMatrix4x4 agxOSG::ExampleApplication::getCoordinateSystemTransform | ( | ) | const |
Gets the transformation for the visual coordinate system and grid.
| bool agxOSG::ExampleApplication::getEnableAutoPausing | ( | ) |
| bool agxOSG::ExampleApplication::getEnableCaptureSyncWithSimulation | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableCoordinateSystem | ( | ) | const |
Is the visual coordinate system enabled/disabled?
| bool agxOSG::ExampleApplication::getEnableDebugRenderer | ( | ) | const |
Is the debug renderer enabled? Will also return false if no simulation exists.
| bool agxOSG::ExampleApplication::getEnableGrid | ( | ) | const |
Is the visual grid enabled/disabled?
| bool agxOSG::ExampleApplication::getEnableJournalIncrementalStructure | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableOSGRenderer | ( | ) |
|
inline |
Definition at line 575 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::getEnableSimulationDump | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableTextDebugRendering | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableVSync | ( | ) | const |
|
inline |
Definition at line 837 of file ExampleApplication.h.
|
inline |
Definition at line 845 of file ExampleApplication.h.
|
inline |
Definition at line 672 of file ExampleApplication.h.
| agx::Vec2u agxOSG::ExampleApplication::getGridResolution | ( | ) | const |
Gets the grid resolution for the visual grid.
| agx::Vec2 agxOSG::ExampleApplication::getGridSize | ( | ) | const |
Gets the grid size for the visual grid.
| intptr_t agxOSG::ExampleApplication::getHWND | ( | ) | const |
|
inline |
Definition at line 675 of file ExampleApplication.h.
|
inline |
Definition at line 676 of file ExampleApplication.h.
| agx::Journal * agxOSG::ExampleApplication::getJournal | ( | ) |
| const std::string & agxOSG::ExampleApplication::getJournalConfigurationPath | ( | ) | const |
| agx::UInt agxOSG::ExampleApplication::getJournalFormat | ( | ) | const |
Gets journal format.
| const std::string & agxOSG::ExampleApplication::getJournalPlaybackPath | ( | ) | const |
| size_t agxOSG::ExampleApplication::getNumScenes | ( | ) | const |
|
inline |
Definition at line 648 of file ExampleApplication.h.
|
inline |
Definition at line 649 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getProfilingJournalPath | ( | ) | const |
| bool agxOSG::ExampleApplication::getQuitEventSetsDone | ( | ) | const |
| bool agxOSG::ExampleApplication::getRealTimeSync | ( | ) | const |
|
inline |
Definition at line 395 of file ExampleApplication.h.
|
inline |
Definition at line 613 of file ExampleApplication.h.
|
inline |
Definition at line 611 of file ExampleApplication.h.
|
inline |
Definition at line 478 of file ExampleApplication.h.
| osg::Group * agxOSG::ExampleApplication::getSceneAgxOSGRoot | ( | ) |
|
inline |
Definition at line 422 of file ExampleApplication.h.
|
inline |
Definition at line 480 of file ExampleApplication.h.
|
inline |
Definition at line 482 of file ExampleApplication.h.
|
inline |
Definition at line 651 of file ExampleApplication.h.
|
inline |
Definition at line 556 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getSolverName | ( | SolverType | t | ) | const |
|
inline |
Definition at line 363 of file ExampleApplication.h.
| SolverType agxOSG::ExampleApplication::getSolverType | ( | const std::string & | name | ) | const |
|
inline |
Definition at line 417 of file ExampleApplication.h.
| double agxOSG::ExampleApplication::getTargetFPS | ( | ) |
Retrieve current number of graphic window updates per second, if <= 0 no throttling is done.
|
inline |
Definition at line 680 of file ExampleApplication.h.
| agx::Real agxOSG::ExampleApplication::getTimeStamp | ( | ) | const |
| agx::Real agxOSG::ExampleApplication::getTimeStep | ( | ) | const |
|
inline |
Definition at line 821 of file ExampleApplication.h.
|
inline |
Definition at line 678 of file ExampleApplication.h.
| agx::Vec3 agxOSG::ExampleApplication::getViewDirection | ( | ) |
|
inline |
Definition at line 629 of file ExampleApplication.h.
|
protected |
| void agxOSG::ExampleApplication::handleReactiveScriptErrors | ( | bool | abortSimulation = true | ) |
| bool agxOSG::ExampleApplication::hasOffscreenWindow | ( | ) | const |
| bool agxOSG::ExampleApplication::hasRenderContext | ( | ) | const |
This is will return false if -a / –agxOnly is specified.
No graphics context will be available for rendering.
| bool agxOSG::ExampleApplication::init | ( | agxIO::ArgumentParser * | arguments, |
| bool | agxOnly = false |
||
| ) |
| bool agxOSG::ExampleApplication::init | ( | int | argc, |
| char ** | argv | ||
| ) |
| void agxOSG::ExampleApplication::initAppendJournal | ( | ) |
|
protected |
| void agxOSG::ExampleApplication::initGraphics | ( | ) |
|
inline |
Definition at line 420 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::initRecordJournal | ( | ) |
|
protected |
| void agxOSG::ExampleApplication::initRpc | ( | ) |
| void agxOSG::ExampleApplication::initScene | ( | ) |
| void agxOSG::ExampleApplication::initScene | ( | osg::Group * | root | ) |
| void agxOSG::ExampleApplication::initSimulation | ( | agxSDK::Simulation * | simulation = nullptr, |
| bool | initializeGraphics = true |
||
| ) |
|
protected |
| void agxOSG::ExampleApplication::initViewer | ( | int | width, |
| int | height, | ||
| bool | osgWindow = true |
||
| ) |
|
inline |
Definition at line 683 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::journalPlayback | ( | ) |
| void agxOSG::ExampleApplication::journalRenderLoader | ( | agxSDK::Assembly * | assembly, |
| bool | keyFrame | ||
| ) |
|
protected |
| void agxOSG::ExampleApplication::listSessionNames | ( | const std::string & | journalToList | ) |
| void agxOSG::ExampleApplication::postExecution | ( | ) |
|
static |
| void agxOSG::ExampleApplication::reloadScene | ( | ) |
| void agxOSG::ExampleApplication::removeAutoPausePair | ( | const agx::RigidBody * | body1, |
| const agx::RigidBody * | body2 | ||
| ) |
| void agxOSG::ExampleApplication::removeAutoPausePair | ( | const agxCollide::Geometry * | geometry1, |
| const agxCollide::Geometry * | geometry2 | ||
| ) |
|
protected |
| bool agxOSG::ExampleApplication::removeRenderTarget | ( | agxOSG::RenderTarget * | rtt | ) |
Remove a specified renderTarget.
| bool agxOSG::ExampleApplication::restoreFromFile | ( | const std::string & | filename | ) |
|
virtual |
| void agxOSG::ExampleApplication::setAllowWindowResizing | ( | bool | flag | ) |
Set if window resizing should be allowed.
|
protected |
| void agxOSG::ExampleApplication::setAutoStepping | ( | bool | flag, |
| bool | resetTimer = true |
||
| ) |
Should the application step automatically? False for 'pause', true for 'play'.
By default setAutoStepping resets the time to next simulation step, so that it will take place in timeStep seconds after the setAutoStepping call. (See setTimeStep()) To prevent this timer reset, use resetTimer=false. The next simulation step will take place in whatever time is left.
| void agxOSG::ExampleApplication::setCameraHome | ( | const agx::Vec3 & | eye, |
| const agx::Vec3 & | center, | ||
| const agx::Vec3 & | up = agx::Vec3(0, 0, 1) |
||
| ) |
| void agxOSG::ExampleApplication::setCoordinateSystemTransform | ( | const agx::AffineMatrix4x4 & | coordinateSystemTransform | ) |
Sets the transformation for the visual coordinate system and grid.
| void agxOSG::ExampleApplication::setDebugRenderInverseMatrix | ( | const agx::AffineMatrix4x4 & | m | ) |
Transform the debug rendering AND pick handler origin by this matrix.
This is handy when you are creating scenes which have coordinates which are very large. For example on the surface of the earth. Find the object which you want to transform into origin, get its translation and call this method with its inverse transform (usually translation only).
| void agxOSG::ExampleApplication::setEnableAutoPausing | ( | bool | flag | ) |
Enable/disable auto-pausing.
| void agxOSG::ExampleApplication::setEnableCaptureSyncWithSimulation | ( | bool | enableSync | ) |
| void agxOSG::ExampleApplication::setEnableCoordinateSystem | ( | bool | flag | ) |
Enables/disables the visual coordinate system.
| bool agxOSG::ExampleApplication::setEnableDebugRenderer | ( | bool | flag | ) |
Set enabling the debug renderer.
Works only when running with graphics (no –agxOnly) and a simulation exists.
| flag | Should the debug renderer be enabled or not? |
| Was | setting the value successful? Will e.g. return false if running without graphics, or if no simulation exists. |
| void agxOSG::ExampleApplication::setEnableGrid | ( | bool | flag | ) |
Enables/disables the visual grid.
| void agxOSG::ExampleApplication::setEnableJournal32bitMode | ( | bool | enable | ) |
Set to true if journal should save data in 32bit float.
| void agxOSG::ExampleApplication::setEnableJournalIncrementalStructure | ( | bool | enable | ) |
| void agxOSG::ExampleApplication::setEnableJournalRecord | ( | bool | enable | ) |
Set if a journal should be recorded from the simulation.
| void agxOSG::ExampleApplication::setEnableOSGRenderer | ( | bool | flag | ) |
|
inline |
Definition at line 574 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::setEnableSimulationDump | ( | bool | flag | ) |
| void agxOSG::ExampleApplication::setEnableTaskProfile | ( | bool | flag | ) |
| void agxOSG::ExampleApplication::setEnableTextDebugRendering | ( | bool | flag | ) |
| void agxOSG::ExampleApplication::setEnableThreadTimeline | ( | bool | flag | ) |
| void agxOSG::ExampleApplication::setEnableVSync | ( | bool | flag, |
| bool | forceUpdate = false |
||
| ) |
| void agxOSG::ExampleApplication::setGridResolution | ( | const agx::Vec2u | gridResolution | ) |
Sets the grid resolution for the visual grid.
| void agxOSG::ExampleApplication::setGridSize | ( | const agx::Vec2 & | gridSize | ) |
Sets the grid size for the visual grid.
| void agxOSG::ExampleApplication::setJournalConfigurationPath | ( | const agx::String & | path | ) |
| void agxOSG::ExampleApplication::setJournalFormat | ( | agx::UInt | journalFormat | ) |
Sets journal format. Only valid before starting journal recording/playback.
| void agxOSG::ExampleApplication::setJournalRecordPath | ( | const agx::String & | journalPath | ) |
Set the path for the recorded journal.
| void agxOSG::ExampleApplication::setOrbitCamera | ( | agxOSG::GeometryNode * | node, |
| const agx::Vec3 & | eye, | ||
| const agx::Vec3 & | center, | ||
| const agx::Vec3 & | up = agx::Vec3::Z_AXIS(), |
||
| int | trackerMode = 0 |
||
| ) |
Sets an orbit camera following an node.
| node | The node. |
| eye | The camera eye. |
| center | The camera center relative geometry center. |
| up | The camera up vector |
| trackerMode | See osgGA::NodeTrackerManipulator::TrackerNode. |
| void agxOSG::ExampleApplication::setOrbitCamera | ( | agxOSG::GeometryNode * | node, |
| double | heading, | ||
| double | elevation, | ||
| double | distance, | ||
| int | trackerMode = 0 |
||
| ) |
Sets an orbit camera following an node.
| node | The node. |
| heading | The camera heading. |
| elevation | The camera elevation. |
| distance | The camera distance |
| trackerMode | See osgGA::NodeTrackerManipulator::TrackerNode. |
| void agxOSG::ExampleApplication::setOsgNotifyLevel | ( | osg::NotifySeverity | severity | ) | const |
| void agxOSG::ExampleApplication::setQuitEventSetsDone | ( | bool | flag | ) |
If set to true (default) pressing the ESC key will exit the run loop and application will shut down.
If false, pressing esc will not quit the application.
| void agxOSG::ExampleApplication::setRealTimeSync | ( | bool | flag | ) |
Should ExampleApplication try to hold simulation in real time? Will wait for wall clock if going to fast, but might still go too slow if simulation or rendering time take too long.
| void agxOSG::ExampleApplication::setRequestedJournalFrequency | ( | agx::Real | freq | ) |
Set the requested recording frequency for attached journal.
|
inline |
Definition at line 479 of file ExampleApplication.h.
|
inline |
Definition at line 362 of file ExampleApplication.h.
|
inline |
Definition at line 418 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::setTargetFPS | ( | double | fps | ) |
Specify number of graphic window updates per second.
| fps | target frames per second, if <= 0 no throttling will be done |
| void agxOSG::ExampleApplication::setTimeStep | ( | agx::Real | dt | ) |
| void agxOSG::ExampleApplication::setupImageCaptureRenderToTexture | ( | ) |
| void agxOSG::ExampleApplication::setupVideoCaptureRenderTotexture | ( | ) |
|
virtual |
| bool agxOSG::ExampleApplication::setWindowRectangle | ( | unsigned int | x, |
| unsigned int | y, | ||
| unsigned int | width, | ||
| unsigned int | height | ||
| ) |
Set the position and size of the window.
| x,y | - X/Y position in pixels of the graphics window |
| width,height | - size in pixels of the graphics window |
| bool agxOSG::ExampleApplication::setWindowTitle | ( | const std::string & | title | ) |
Set the title of the window.
| title | - Title string to set on the window |
|
inline |
Definition at line 451 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::step | ( | ) |
| void agxOSG::ExampleApplication::stepSimulation | ( | ) |
| void agxOSG::ExampleApplication::stepWrapper | ( | ) |
|
inline |
Stop (=exit) the application at next opportunity.
Meaning, exit the run loop.
| exitCode | - The exit code that will be used when returning from the run loop. |
Definition at line 445 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::stopAfter | ( | const agx::Real | stopTime | ) |
Lets the application stop after a certain simulation time.
Same as using –stopAfter command line argument.
| stopTime | Simulation time after which the application should stop. |
| void agxOSG::ExampleApplication::storeInitialJournalState | ( | ) |
| void agxOSG::ExampleApplication::synchronizedStep | ( | bool | blocking = false | ) |
| void agxOSG::ExampleApplication::takeScreenShot | ( | const agx::String & | filename = "" | ) |
Takes a screen shot of the scene.
If filename is left empty, it will default to "agx_screen_%05d.png".
| void agxOSG::ExampleApplication::throttleIdleCpuUsageBySleeping | ( | ) |
|
protected |
|
protected |
|
protected |
| void agxOSG::ExampleApplication::updateCoSimulationServer | ( | ) |
| bool agxOSG::ExampleApplication::updatePythonCoSimulationServer | ( | const agx::String & | filename, |
| std::stringstream & | buffer | ||
| ) |
| void agxOSG::ExampleApplication::updateRemoteDebugger | ( | ) |
| void agxOSG::ExampleApplication::updateServices | ( | ) |
|
inline |
Definition at line 670 of file ExampleApplication.h.
| AutoStepEvent agxOSG::ExampleApplication::autoStepEvent |
Definition at line 336 of file ExampleApplication.h.
|
protected |
Definition at line 1057 of file ExampleApplication.h.
|
protected |
Definition at line 992 of file ExampleApplication.h.
|
protected |
Definition at line 1073 of file ExampleApplication.h.
|
protected |
Definition at line 975 of file ExampleApplication.h.
|
protected |
Definition at line 1054 of file ExampleApplication.h.
|
protected |
Definition at line 991 of file ExampleApplication.h.
|
protected |
Definition at line 984 of file ExampleApplication.h.
|
protected |
Definition at line 1002 of file ExampleApplication.h.
|
protected |
Definition at line 1001 of file ExampleApplication.h.
|
protected |
Definition at line 1000 of file ExampleApplication.h.
|
protected |
Definition at line 1126 of file ExampleApplication.h.
|
protected |
Definition at line 1024 of file ExampleApplication.h.
|
protected |
Definition at line 1023 of file ExampleApplication.h.
|
protected |
Definition at line 1022 of file ExampleApplication.h.
|
protected |
Definition at line 1025 of file ExampleApplication.h.
|
protected |
Definition at line 1055 of file ExampleApplication.h.
|
protected |
Definition at line 1110 of file ExampleApplication.h.
|
protected |
Definition at line 1107 of file ExampleApplication.h.
|
protected |
Definition at line 1104 of file ExampleApplication.h.
|
protected |
Definition at line 1034 of file ExampleApplication.h.
|
protected |
Definition at line 1032 of file ExampleApplication.h.
|
protected |
Definition at line 1035 of file ExampleApplication.h.
|
protected |
Definition at line 1033 of file ExampleApplication.h.
|
protected |
Definition at line 1014 of file ExampleApplication.h.
|
protected |
Definition at line 1015 of file ExampleApplication.h.
|
protected |
Definition at line 951 of file ExampleApplication.h.
|
protected |
Definition at line 1078 of file ExampleApplication.h.
|
protected |
Definition at line 1074 of file ExampleApplication.h.
|
protected |
Definition at line 1113 of file ExampleApplication.h.
|
protected |
Definition at line 1112 of file ExampleApplication.h.
|
protected |
Definition at line 1065 of file ExampleApplication.h.
|
protected |
Definition at line 1118 of file ExampleApplication.h.
|
protected |
Definition at line 953 of file ExampleApplication.h.
|
protected |
Definition at line 1013 of file ExampleApplication.h.
|
protected |
Definition at line 1115 of file ExampleApplication.h.
|
protected |
Definition at line 1040 of file ExampleApplication.h.
|
protected |
Definition at line 1047 of file ExampleApplication.h.
|
protected |
Definition at line 1059 of file ExampleApplication.h.
|
protected |
Definition at line 1071 of file ExampleApplication.h.
|
protected |
Definition at line 1069 of file ExampleApplication.h.
|
protected |
Definition at line 1077 of file ExampleApplication.h.
|
protected |
Definition at line 1030 of file ExampleApplication.h.
|
protected |
Definition at line 1027 of file ExampleApplication.h.
|
protected |
Definition at line 1128 of file ExampleApplication.h.
|
protected |
Definition at line 1019 of file ExampleApplication.h.
|
protected |
Definition at line 1020 of file ExampleApplication.h.
|
protected |
Definition at line 1017 of file ExampleApplication.h.
|
protected |
Definition at line 1109 of file ExampleApplication.h.
|
protected |
Definition at line 1108 of file ExampleApplication.h.
|
protected |
Definition at line 1105 of file ExampleApplication.h.
|
protected |
Definition at line 1106 of file ExampleApplication.h.
|
protected |
Definition at line 1072 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::m_hostName |
Definition at line 1101 of file ExampleApplication.h.
|
protected |
Definition at line 956 of file ExampleApplication.h.
|
protected |
Definition at line 1123 of file ExampleApplication.h.
|
protected |
Definition at line 980 of file ExampleApplication.h.
|
protected |
Definition at line 1114 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isFMU |
Definition at line 1099 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isLoadingScene |
Definition at line 1098 of file ExampleApplication.h.
|
protected |
Definition at line 1052 of file ExampleApplication.h.
|
protected |
Definition at line 1117 of file ExampleApplication.h.
|
protected |
Definition at line 1039 of file ExampleApplication.h.
|
protected |
Definition at line 1044 of file ExampleApplication.h.
|
protected |
Definition at line 1041 of file ExampleApplication.h.
|
protected |
Definition at line 1050 of file ExampleApplication.h.
|
protected |
Definition at line 1038 of file ExampleApplication.h.
|
protected |
Definition at line 1051 of file ExampleApplication.h.
|
protected |
Definition at line 1045 of file ExampleApplication.h.
|
protected |
Definition at line 1048 of file ExampleApplication.h.
|
protected |
Definition at line 1046 of file ExampleApplication.h.
|
protected |
Definition at line 1042 of file ExampleApplication.h.
|
protected |
Definition at line 1043 of file ExampleApplication.h.
|
protected |
Definition at line 971 of file ExampleApplication.h.
|
protected |
Definition at line 972 of file ExampleApplication.h.
|
protected |
Definition at line 1124 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_loadedSceneFile |
Definition at line 1097 of file ExampleApplication.h.
|
protected |
Definition at line 990 of file ExampleApplication.h.
|
protected |
Definition at line 1127 of file ExampleApplication.h.
|
protected |
Definition at line 1087 of file ExampleApplication.h.
|
protected |
Definition at line 1086 of file ExampleApplication.h.
|
protected |
Definition at line 1088 of file ExampleApplication.h.
|
protected |
Definition at line 1089 of file ExampleApplication.h.
|
protected |
Definition at line 1090 of file ExampleApplication.h.
|
protected |
Definition at line 1085 of file ExampleApplication.h.
|
protected |
Definition at line 963 of file ExampleApplication.h.
|
protected |
Definition at line 978 of file ExampleApplication.h.
|
protected |
Definition at line 1111 of file ExampleApplication.h.
|
protected |
Definition at line 1080 of file ExampleApplication.h.
|
protected |
Definition at line 1081 of file ExampleApplication.h.
|
protected |
Definition at line 1004 of file ExampleApplication.h.
|
protected |
Definition at line 1082 of file ExampleApplication.h.
|
protected |
Definition at line 1028 of file ExampleApplication.h.
|
protected |
Definition at line 1037 of file ExampleApplication.h.
|
protected |
Definition at line 1026 of file ExampleApplication.h.
|
protected |
Definition at line 985 of file ExampleApplication.h.
|
protected |
Definition at line 1075 of file ExampleApplication.h.
|
protected |
Definition at line 986 of file ExampleApplication.h.
|
protected |
Definition at line 1067 of file ExampleApplication.h.
|
protected |
Definition at line 1064 of file ExampleApplication.h.
|
protected |
Definition at line 1079 of file ExampleApplication.h.
|
protected |
Definition at line 958 of file ExampleApplication.h.
|
protected |
Definition at line 960 of file ExampleApplication.h.
|
protected |
Definition at line 977 of file ExampleApplication.h.
|
protected |
Definition at line 965 of file ExampleApplication.h.
| agx::Event agxOSG::ExampleApplication::m_sceneLoadEvent |
Definition at line 1100 of file ExampleApplication.h.
|
protected |
Definition at line 959 of file ExampleApplication.h.
|
protected |
Definition at line 961 of file ExampleApplication.h.
|
protected |
Definition at line 1011 of file ExampleApplication.h.
|
protected |
Definition at line 1070 of file ExampleApplication.h.
|
protected |
Definition at line 1006 of file ExampleApplication.h.
|
protected |
Definition at line 1009 of file ExampleApplication.h.
|
protected |
Definition at line 1012 of file ExampleApplication.h.
|
protected |
Definition at line 952 of file ExampleApplication.h.
|
protected |
Definition at line 974 of file ExampleApplication.h.
|
protected |
Definition at line 1066 of file ExampleApplication.h.
|
protected |
Definition at line 987 of file ExampleApplication.h.
|
protected |
Definition at line 993 of file ExampleApplication.h.
|
protected |
Definition at line 1116 of file ExampleApplication.h.
|
protected |
Definition at line 1076 of file ExampleApplication.h.
|
protected |
Definition at line 989 of file ExampleApplication.h.
|
protected |
Definition at line 988 of file ExampleApplication.h.
|
protected |
Definition at line 1068 of file ExampleApplication.h.
|
protected |
Definition at line 1029 of file ExampleApplication.h.
|
mutableprotected |
Definition at line 982 of file ExampleApplication.h.
|
protected |
Definition at line 1031 of file ExampleApplication.h.
|
protected |
Definition at line 1121 of file ExampleApplication.h.
|
protected |
Definition at line 1122 of file ExampleApplication.h.
|
protected |
Definition at line 1120 of file ExampleApplication.h.
|
protected |
Definition at line 954 of file ExampleApplication.h.
|
protected |
Definition at line 1036 of file ExampleApplication.h.
|
protected |
Definition at line 1129 of file ExampleApplication.h.
|
protected |
Definition at line 1008 of file ExampleApplication.h.