|
AGX Dynamics
2.37.2.0
|
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 } |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| bool | addScene (const std::string &scriptFile, const std::string &scriptFunction, 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 (BuildScenePtr sceneFunction, int key, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false) |
| bool | addScene (BuildScenePtr sceneFunction, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false) |
| bool | addScene (SceneDescription sceneDescription, int key) |
| bool | addScene (SceneDescription sceneDescription) |
| void | applyCameraData (const agxOSG::CameraData &cameraData) |
| Apply camera data. More... | |
| bool | breakRequested () const |
| void | cancelStop () |
| Will cancel the stop if possible. Continue the ::run loop. More... | |
| void | centerScene () |
| void | changeSolver () |
| void | clearAddedScenes () |
| Remove all added scenes. More... | |
| 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::Simulation *simulation, float detailRatio=1.0f, bool createAxes=false) |
| void | createVisual (agxSDK::Assembly *assembly, float detailRatio=1.0f, bool createAxes=false) |
| bool | done () const |
| If no graphics is used, this method always return false. More... | |
| 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). More... | |
| bool | executeOneStepWithoutGraphics () |
| osg::Group * | executePythonScript (const agx::String &file, const agx::String &function, bool &success) |
Execute a python script file with a named function. More... | |
| void | fitSceneIntoView () |
| bool | getAllowWindowResizing () const |
| Is window resizing allowed? More... | |
| agxIO::ArgumentParser * | getArguments () |
| bool | getAutoStepping () const |
| Should the application step automatically? False for 'pause', true for 'play'. More... | |
| 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. More... | |
| bool | getEnableAutoPausing () |
| bool | getEnableCaptureSyncWithSimulation () const |
| bool | getEnableCoordinateSystem () const |
| Is the visual coordinate system enabled/disabled? More... | |
| bool | getEnableDebugRenderer () const |
| Is the debug renderer enabled? Will also return false if no simulation exists. More... | |
| bool | getEnableGrid () const |
| Is the visual grid enabled/disabled? More... | |
| 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. More... | |
| agx::Vec2 | getGridSize () const |
| Gets the grid size for the visual grid. More... | |
| 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. More... | |
| 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. More... | |
| 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 | 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 () |
| bool | readCFGFile () |
| 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. More... | |
| bool | restoreFromFile (const std::string &filename) |
| virtual int | run () |
| void | setAllowWindowResizing (bool flag) |
| Set if window resizing should be allowed. More... | |
| void | setAutoStepping (bool flag, bool resetTimer=true) |
| Should the application step automatically? False for 'pause', true for 'play'. More... | |
| 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. More... | |
| void | setDebugRenderInverseMatrix (const agx::AffineMatrix4x4 &m) |
| Transform the debug rendering AND pick handler origin by this matrix. More... | |
| void | setEnableAutoPausing (bool flag) |
| Enable/disable auto-pausing. More... | |
| void | setEnableCaptureSyncWithSimulation (bool enableSync) |
| void | setEnableCoordinateSystem (bool flag) |
| Enables/disables the visual coordinate system. More... | |
| bool | setEnableDebugRenderer (bool flag) |
| Set enabling the debug renderer. More... | |
| void | setEnableGrid (bool flag) |
| Enables/disables the visual grid. More... | |
| void | setEnableJournal32bitMode (bool enable) |
| Set to true if journal should save data in 32bit float. More... | |
| void | setEnableJournalIncrementalStructure (bool enable) |
| void | setEnableJournalRecord (bool enable) |
| Set if a journal should be recorded from the simulation. More... | |
| 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. More... | |
| void | setGridSize (const agx::Vec2 &gridSize) |
| Sets the grid size for the visual grid. More... | |
| void | setJournalConfigurationPath (const agx::String &path) |
| void | setJournalFormat (agx::UInt journalFormat) |
| Sets journal format. Only valid before starting journal recording/playback. More... | |
| void | setJournalRecordPath (const agx::String &journalPath) |
| Set the path for the recorded journal. More... | |
| void | setOrbitCamera (agxOSG::GeometryNode *node, double heading, double elevation, double distance, int trackerMode=0) |
| Sets an orbit camera following an node. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void | setRequestedJournalFrequency (agx::Real freq) |
| Set the requested recording frequency for attached journal. More... | |
| 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. More... | |
| void | setTimeStep (agx::Real dt) |
| 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. More... | |
| bool | setWindowTitle (const std::string &title) |
| Set the title of the window. More... | |
| bool | shouldStop () const |
| void | step () |
| void | stepSimulation () |
| void | stepWrapper () |
| void | stop (int exitCode=0) |
| Stop (=exit) the application at next opportunity. More... | |
| void | stopAfter (const agx::Real stopTime) |
| Lets the application stop after a certain simulation time. More... | |
| void | storeInitialJournalState () |
| void | synchronizedStep (bool blocking=false) |
| void | takeScreenShot (const agx::String &filename="") |
| Takes a screen shot of the scene. More... | |
| 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. 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 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. More... | |
Class that encapsulates rendering and simulation using OpenSceneGraph.
Definition at line 320 of file ExampleApplication.h.
| typedef agx::Event1<bool> agxOSG::ExampleApplication::AutoStepEvent |
Definition at line 323 of file ExampleApplication.h.
|
protected |
Definition at line 899 of file ExampleApplication.h.
|
protected |
Definition at line 901 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 | |
Definition at line 331 of file ExampleApplication.h.
| Enumerator | |
|---|---|
| MULTI | |
| ITERATIVE | |
| NUM_SOLVERS | |
Definition at line 340 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 | ( | const std::string & | scriptFile, |
| const std::string & | scriptFunction, | ||
| 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 | ( | BuildScenePtr | sceneFunction, |
| int | key, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = -1, |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | BuildScenePtr | sceneFunction, |
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = -1, |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | SceneDescription | sceneDescription, |
| int | key | ||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | SceneDescription | sceneDescription | ) |
| 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 429 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::centerScene | ( | ) |
| void agxOSG::ExampleApplication::changeSolver | ( | ) |
|
inline |
Remove all added scenes.
Definition at line 396 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::Simulation * | simulation, |
| float | detailRatio = 1.0f, |
||
| bool | createAxes = false |
||
| ) |
| void agxOSG::ExampleApplication::createVisual | ( | agxSDK::Assembly * | assembly, |
| 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 379 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 604 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 548 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::getEnableSimulationDump | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableTextDebugRendering | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableVSync | ( | ) | const |
|
inline |
Definition at line 811 of file ExampleApplication.h.
References agxOSG::createAxes(), and agxOSG::createVisual().
|
inline |
Definition at line 819 of file ExampleApplication.h.
|
inline |
Definition at line 646 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 649 of file ExampleApplication.h.
|
inline |
Definition at line 650 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 622 of file ExampleApplication.h.
|
inline |
Definition at line 623 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getProfilingJournalPath | ( | ) | const |
| bool agxOSG::ExampleApplication::getQuitEventSetsDone | ( | ) | const |
| bool agxOSG::ExampleApplication::getRealTimeSync | ( | ) | const |
|
inline |
Definition at line 381 of file ExampleApplication.h.
|
inline |
Definition at line 586 of file ExampleApplication.h.
|
inline |
Definition at line 584 of file ExampleApplication.h.
|
inline |
Definition at line 458 of file ExampleApplication.h.
| osg::Group* agxOSG::ExampleApplication::getSceneAgxOSGRoot | ( | ) |
|
inline |
Definition at line 403 of file ExampleApplication.h.
|
inline |
Definition at line 460 of file ExampleApplication.h.
|
inline |
Definition at line 462 of file ExampleApplication.h.
|
inline |
Definition at line 625 of file ExampleApplication.h.
|
inline |
Definition at line 529 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getSolverName | ( | SolverType | t | ) | const |
|
inline |
Definition at line 349 of file ExampleApplication.h.
References agx::init().
| SolverType agxOSG::ExampleApplication::getSolverType | ( | const std::string & | name | ) | const |
|
inline |
Definition at line 398 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 654 of file ExampleApplication.h.
| agx::Real agxOSG::ExampleApplication::getTimeStamp | ( | ) | const |
| agx::Real agxOSG::ExampleApplication::getTimeStep | ( | ) | const |
|
inline |
Definition at line 795 of file ExampleApplication.h.
|
inline |
Definition at line 652 of file ExampleApplication.h.
| agx::Vec3 agxOSG::ExampleApplication::getViewDirection | ( | ) |
|
inline |
Definition at line 603 of file ExampleApplication.h.
|
protected |
| void agxOSG::ExampleApplication::handleReactiveScriptErrors | ( | bool | abortSimulation = true | ) |
| bool agxOSG::ExampleApplication::hasOffscreenWindow | ( | ) | const |
| 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 401 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::initRecordJournal | ( | ) |
| 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 657 of file ExampleApplication.h.
References agx::root(), agxOSG::setOrbitCamera(), and agx::Vec3T< Real >::Z_AXIS().
| void agxOSG::ExampleApplication::journalPlayback | ( | ) |
| void agxOSG::ExampleApplication::journalRenderLoader | ( | agxSDK::Assembly * | assembly, |
| bool | keyFrame | ||
| ) |
|
protected |
| void agxOSG::ExampleApplication::listSessionNames | ( | const std::string & | journalToList | ) |
|
protected |
| void agxOSG::ExampleApplication::postExecution | ( | ) |
| bool agxOSG::ExampleApplication::readCFGFile | ( | ) |
|
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 547 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, |
| 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::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::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 459 of file ExampleApplication.h.
|
inline |
Definition at line 348 of file ExampleApplication.h.
|
inline |
Definition at line 399 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::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 432 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 426 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 644 of file ExampleApplication.h.
|
protected |
| AutoStepEvent agxOSG::ExampleApplication::autoStepEvent |
Definition at line 324 of file ExampleApplication.h.
|
protected |
Definition at line 990 of file ExampleApplication.h.
|
protected |
Definition at line 925 of file ExampleApplication.h.
|
protected |
Definition at line 1006 of file ExampleApplication.h.
|
protected |
Definition at line 907 of file ExampleApplication.h.
|
protected |
Definition at line 987 of file ExampleApplication.h.
|
protected |
Definition at line 924 of file ExampleApplication.h.
|
protected |
Definition at line 917 of file ExampleApplication.h.
|
protected |
Definition at line 935 of file ExampleApplication.h.
|
protected |
Definition at line 934 of file ExampleApplication.h.
|
protected |
Definition at line 933 of file ExampleApplication.h.
|
protected |
Definition at line 1045 of file ExampleApplication.h.
|
protected |
Definition at line 957 of file ExampleApplication.h.
|
protected |
Definition at line 956 of file ExampleApplication.h.
|
protected |
Definition at line 955 of file ExampleApplication.h.
|
protected |
Definition at line 958 of file ExampleApplication.h.
|
protected |
Definition at line 913 of file ExampleApplication.h.
|
protected |
Definition at line 988 of file ExampleApplication.h.
|
protected |
Definition at line 1031 of file ExampleApplication.h.
|
protected |
Definition at line 1028 of file ExampleApplication.h.
|
protected |
Definition at line 1025 of file ExampleApplication.h.
|
protected |
Definition at line 967 of file ExampleApplication.h.
|
protected |
Definition at line 965 of file ExampleApplication.h.
|
protected |
Definition at line 968 of file ExampleApplication.h.
|
protected |
Definition at line 966 of file ExampleApplication.h.
|
protected |
Definition at line 947 of file ExampleApplication.h.
|
protected |
Definition at line 948 of file ExampleApplication.h.
|
protected |
Definition at line 883 of file ExampleApplication.h.
|
protected |
Definition at line 1011 of file ExampleApplication.h.
|
protected |
Definition at line 1007 of file ExampleApplication.h.
|
protected |
Definition at line 1034 of file ExampleApplication.h.
|
protected |
Definition at line 1033 of file ExampleApplication.h.
|
protected |
Definition at line 998 of file ExampleApplication.h.
|
protected |
Definition at line 885 of file ExampleApplication.h.
|
protected |
Definition at line 946 of file ExampleApplication.h.
|
protected |
Definition at line 1036 of file ExampleApplication.h.
|
protected |
Definition at line 973 of file ExampleApplication.h.
|
protected |
Definition at line 980 of file ExampleApplication.h.
|
protected |
Definition at line 992 of file ExampleApplication.h.
|
protected |
Definition at line 1004 of file ExampleApplication.h.
|
protected |
Definition at line 1002 of file ExampleApplication.h.
|
protected |
Definition at line 1010 of file ExampleApplication.h.
|
protected |
Definition at line 963 of file ExampleApplication.h.
|
protected |
Definition at line 960 of file ExampleApplication.h.
|
protected |
Definition at line 1047 of file ExampleApplication.h.
|
protected |
Definition at line 952 of file ExampleApplication.h.
|
protected |
Definition at line 953 of file ExampleApplication.h.
|
protected |
Definition at line 950 of file ExampleApplication.h.
|
protected |
Definition at line 1030 of file ExampleApplication.h.
|
protected |
Definition at line 1029 of file ExampleApplication.h.
|
protected |
Definition at line 1026 of file ExampleApplication.h.
|
protected |
Definition at line 1027 of file ExampleApplication.h.
|
protected |
Definition at line 1005 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::m_hostName |
Definition at line 1022 of file ExampleApplication.h.
|
protected |
Definition at line 888 of file ExampleApplication.h.
|
protected |
Definition at line 912 of file ExampleApplication.h.
|
protected |
Definition at line 1035 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isFMU |
Definition at line 1020 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isLoadingScene |
Definition at line 1019 of file ExampleApplication.h.
|
protected |
Definition at line 985 of file ExampleApplication.h.
|
protected |
Definition at line 1038 of file ExampleApplication.h.
|
protected |
Definition at line 972 of file ExampleApplication.h.
|
protected |
Definition at line 977 of file ExampleApplication.h.
|
protected |
Definition at line 974 of file ExampleApplication.h.
|
protected |
Definition at line 983 of file ExampleApplication.h.
|
protected |
Definition at line 971 of file ExampleApplication.h.
|
protected |
Definition at line 984 of file ExampleApplication.h.
|
protected |
Definition at line 978 of file ExampleApplication.h.
|
protected |
Definition at line 981 of file ExampleApplication.h.
|
protected |
Definition at line 979 of file ExampleApplication.h.
|
protected |
Definition at line 975 of file ExampleApplication.h.
|
protected |
Definition at line 976 of file ExampleApplication.h.
|
protected |
Definition at line 903 of file ExampleApplication.h.
|
protected |
Definition at line 904 of file ExampleApplication.h.
|
protected |
Definition at line 1043 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_loadedSceneFile |
Definition at line 1018 of file ExampleApplication.h.
|
protected |
Definition at line 923 of file ExampleApplication.h.
|
protected |
Definition at line 1046 of file ExampleApplication.h.
|
protected |
Definition at line 895 of file ExampleApplication.h.
|
protected |
Definition at line 910 of file ExampleApplication.h.
|
protected |
Definition at line 1032 of file ExampleApplication.h.
|
protected |
Definition at line 1013 of file ExampleApplication.h.
|
protected |
Definition at line 1014 of file ExampleApplication.h.
|
protected |
Definition at line 937 of file ExampleApplication.h.
|
protected |
Definition at line 1015 of file ExampleApplication.h.
|
protected |
Definition at line 961 of file ExampleApplication.h.
|
protected |
Definition at line 970 of file ExampleApplication.h.
|
protected |
Definition at line 959 of file ExampleApplication.h.
|
protected |
Definition at line 918 of file ExampleApplication.h.
|
protected |
Definition at line 1008 of file ExampleApplication.h.
|
protected |
Definition at line 919 of file ExampleApplication.h.
|
protected |
Definition at line 1000 of file ExampleApplication.h.
|
protected |
Definition at line 997 of file ExampleApplication.h.
|
protected |
Definition at line 1012 of file ExampleApplication.h.
|
protected |
Definition at line 890 of file ExampleApplication.h.
|
protected |
Definition at line 892 of file ExampleApplication.h.
|
protected |
Definition at line 909 of file ExampleApplication.h.
|
protected |
Definition at line 897 of file ExampleApplication.h.
| agx::Event agxOSG::ExampleApplication::m_sceneLoadEvent |
Definition at line 1021 of file ExampleApplication.h.
|
protected |
Definition at line 891 of file ExampleApplication.h.
|
protected |
Definition at line 893 of file ExampleApplication.h.
|
protected |
Definition at line 944 of file ExampleApplication.h.
|
protected |
Definition at line 1003 of file ExampleApplication.h.
|
protected |
Definition at line 939 of file ExampleApplication.h.
|
protected |
Definition at line 942 of file ExampleApplication.h.
|
protected |
Definition at line 945 of file ExampleApplication.h.
|
protected |
Definition at line 884 of file ExampleApplication.h.
|
protected |
Definition at line 906 of file ExampleApplication.h.
|
protected |
Definition at line 999 of file ExampleApplication.h.
|
protected |
Definition at line 920 of file ExampleApplication.h.
|
protected |
Definition at line 926 of file ExampleApplication.h.
|
protected |
Definition at line 1037 of file ExampleApplication.h.
|
protected |
Definition at line 1009 of file ExampleApplication.h.
|
protected |
Definition at line 922 of file ExampleApplication.h.
|
protected |
Definition at line 921 of file ExampleApplication.h.
|
protected |
Definition at line 1001 of file ExampleApplication.h.
|
protected |
Definition at line 962 of file ExampleApplication.h.
|
mutableprotected |
Definition at line 915 of file ExampleApplication.h.
|
protected |
Definition at line 964 of file ExampleApplication.h.
|
protected |
Definition at line 1041 of file ExampleApplication.h.
|
protected |
Definition at line 1042 of file ExampleApplication.h.
|
protected |
Definition at line 1040 of file ExampleApplication.h.
|
protected |
Definition at line 886 of file ExampleApplication.h.
|
protected |
Definition at line 969 of file ExampleApplication.h.
|
protected |
Definition at line 941 of file ExampleApplication.h.