|
AGX Dynamics
2.35.0.1
|
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 (BuildScenePtr sceneFunction, bool isPartofUnitTest=true, float stopAfter=float(), bool isSlowUnittest=false) |
| bool | addScene (BuildScenePtr sceneFunction, int key, bool isPartofUnitTest=true, float stopAfter=float(), bool isSlowUnittest=false) |
| bool | addScene (const std::string &scriptFile, const std::string &scriptFunction, bool isPartofUnitTest=true, float stopAfter=float(), bool isSlowUnittest=false) |
| bool | addScene (const std::string &scriptFile, const std::string &scriptFunction, int key, bool isPartofUnitTest=true, float stopAfter=float(), bool isSlowUnittest=false) |
| bool | addScene (SceneDescription sceneDescription) |
| bool | addScene (SceneDescription sceneDescription, int key) |
| 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::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. More... | |
| bool | executeOneStepWithGraphics () |
| bool | executeOneStepWithoutGraphics () |
| 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 |
| std::string | getLuaFilePath () const |
| Get file path to most recent lua file. More... | |
| 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 |
| 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 | 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) |
| 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, 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 | setOrbitCamera (agxOSG::GeometryNode *node, double heading, double elevation, double distance, 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 | 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 317 of file ExampleApplication.h.
| typedef agx::Event1<bool> agxOSG::ExampleApplication::AutoStepEvent |
Definition at line 320 of file ExampleApplication.h.
|
protected |
Definition at line 856 of file ExampleApplication.h.
|
protected |
Definition at line 858 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 328 of file ExampleApplication.h.
| Enumerator | |
|---|---|
| MULTI | |
| ITERATIVE | |
| NUM_SOLVERS | |
Definition at line 337 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 = float(), |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | BuildScenePtr | sceneFunction, |
| int | key, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = float(), |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | const std::string & | scriptFile, |
| const std::string & | scriptFunction, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = float(), |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | const std::string & | scriptFile, |
| const std::string & | scriptFunction, | ||
| int | key, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = float(), |
||
| 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 |
|
inline |
Will cancel the stop if possible. Continue the ::run loop.
Definition at line 413 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::centerScene | ( | ) |
| void agxOSG::ExampleApplication::changeSolver | ( | ) |
|
inline |
Remove all added scenes.
Definition at line 393 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 |
|
protected |
| bool agxOSG::ExampleApplication::executeOneStepWithGraphics | ( | ) |
|
protected |
| bool agxOSG::ExampleApplication::executeOneStepWithoutGraphics | ( | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| void agxOSG::ExampleApplication::fitSceneIntoView | ( | ) |
|
protected |
| bool agxOSG::ExampleApplication::getAllowWindowResizing | ( | ) | const |
Is window resizing allowed?
|
inline |
Definition at line 376 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 584 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 528 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::getEnableSimulationDump | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableTextDebugRendering | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableVSync | ( | ) | const |
|
inline |
Definition at line 789 of file ExampleApplication.h.
|
inline |
Definition at line 797 of file ExampleApplication.h.
|
inline |
Definition at line 632 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 635 of file ExampleApplication.h.
|
inline |
Definition at line 636 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 |
|
inline |
Get file path to most recent lua file.
Definition at line 608 of file ExampleApplication.h.
| size_t agxOSG::ExampleApplication::getNumScenes | ( | ) | const |
|
inline |
Definition at line 602 of file ExampleApplication.h.
|
inline |
Definition at line 603 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getProfilingJournalPath | ( | ) | const |
| bool agxOSG::ExampleApplication::getQuitEventSetsDone | ( | ) | const |
| bool agxOSG::ExampleApplication::getRealTimeSync | ( | ) | const |
|
inline |
Definition at line 378 of file ExampleApplication.h.
|
inline |
Definition at line 566 of file ExampleApplication.h.
|
inline |
Definition at line 564 of file ExampleApplication.h.
|
inline |
Definition at line 443 of file ExampleApplication.h.
| osg::Group* agxOSG::ExampleApplication::getSceneAgxOSGRoot | ( | ) |
|
inline |
Definition at line 400 of file ExampleApplication.h.
|
inline |
Definition at line 445 of file ExampleApplication.h.
|
inline |
Definition at line 447 of file ExampleApplication.h.
|
inline |
Definition at line 605 of file ExampleApplication.h.
|
inline |
Definition at line 514 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getSolverName | ( | SolverType | t | ) | const |
|
inline |
Definition at line 346 of file ExampleApplication.h.
| SolverType agxOSG::ExampleApplication::getSolverType | ( | const std::string & | name | ) | const |
|
inline |
Definition at line 395 of file ExampleApplication.h.
|
inline |
Definition at line 640 of file ExampleApplication.h.
| agx::Real agxOSG::ExampleApplication::getTimeStamp | ( | ) | const |
| agx::Real agxOSG::ExampleApplication::getTimeStep | ( | ) | const |
|
inline |
Definition at line 773 of file ExampleApplication.h.
|
inline |
Definition at line 638 of file ExampleApplication.h.
| agx::Vec3 agxOSG::ExampleApplication::getViewDirection | ( | ) |
|
inline |
Definition at line 583 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 | ||
| ) |
|
protected |
| void agxOSG::ExampleApplication::initGraphics | ( | ) |
|
inline |
Definition at line 398 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 643 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 | ) |
|
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 | ) |
Should the application step automatically? False for 'pause', true for 'play'.
| 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 527 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 444 of file ExampleApplication.h.
|
inline |
Definition at line 345 of file ExampleApplication.h.
|
inline |
Definition at line 396 of file ExampleApplication.h.
| 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 416 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 410 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 |
| 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 630 of file ExampleApplication.h.
| AutoStepEvent agxOSG::ExampleApplication::autoStepEvent |
Definition at line 321 of file ExampleApplication.h.
|
protected |
Definition at line 947 of file ExampleApplication.h.
|
protected |
Definition at line 881 of file ExampleApplication.h.
|
protected |
Definition at line 961 of file ExampleApplication.h.
|
protected |
Definition at line 864 of file ExampleApplication.h.
|
protected |
Definition at line 944 of file ExampleApplication.h.
|
protected |
Definition at line 880 of file ExampleApplication.h.
|
protected |
Definition at line 874 of file ExampleApplication.h.
|
protected |
Definition at line 891 of file ExampleApplication.h.
|
protected |
Definition at line 890 of file ExampleApplication.h.
|
protected |
Definition at line 889 of file ExampleApplication.h.
|
protected |
Definition at line 913 of file ExampleApplication.h.
|
protected |
Definition at line 912 of file ExampleApplication.h.
|
protected |
Definition at line 911 of file ExampleApplication.h.
|
protected |
Definition at line 914 of file ExampleApplication.h.
|
protected |
Definition at line 870 of file ExampleApplication.h.
|
protected |
Definition at line 945 of file ExampleApplication.h.
|
protected |
Definition at line 986 of file ExampleApplication.h.
|
protected |
Definition at line 983 of file ExampleApplication.h.
|
protected |
Definition at line 980 of file ExampleApplication.h.
|
protected |
Definition at line 923 of file ExampleApplication.h.
|
protected |
Definition at line 921 of file ExampleApplication.h.
|
protected |
Definition at line 924 of file ExampleApplication.h.
|
protected |
Definition at line 922 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 840 of file ExampleApplication.h.
|
protected |
Definition at line 966 of file ExampleApplication.h.
|
protected |
Definition at line 962 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 953 of file ExampleApplication.h.
|
protected |
Definition at line 842 of file ExampleApplication.h.
|
protected |
Definition at line 902 of file ExampleApplication.h.
|
protected |
Definition at line 991 of file ExampleApplication.h.
|
protected |
Definition at line 930 of file ExampleApplication.h.
|
protected |
Definition at line 937 of file ExampleApplication.h.
|
protected |
Definition at line 959 of file ExampleApplication.h.
|
protected |
Definition at line 957 of file ExampleApplication.h.
|
protected |
Definition at line 965 of file ExampleApplication.h.
|
protected |
Definition at line 919 of file ExampleApplication.h.
|
protected |
Definition at line 916 of file ExampleApplication.h.
|
protected |
Definition at line 908 of file ExampleApplication.h.
|
protected |
Definition at line 909 of file ExampleApplication.h.
|
protected |
Definition at line 906 of file ExampleApplication.h.
|
protected |
Definition at line 985 of file ExampleApplication.h.
|
protected |
Definition at line 984 of file ExampleApplication.h.
|
protected |
Definition at line 981 of file ExampleApplication.h.
|
protected |
Definition at line 982 of file ExampleApplication.h.
|
protected |
Definition at line 960 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::m_hostName |
Definition at line 977 of file ExampleApplication.h.
|
protected |
Definition at line 845 of file ExampleApplication.h.
|
protected |
Definition at line 869 of file ExampleApplication.h.
|
protected |
Definition at line 990 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isFMU |
Definition at line 975 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isLoadingScene |
Definition at line 974 of file ExampleApplication.h.
|
protected |
Definition at line 942 of file ExampleApplication.h.
|
protected |
Definition at line 929 of file ExampleApplication.h.
|
protected |
Definition at line 934 of file ExampleApplication.h.
|
protected |
Definition at line 931 of file ExampleApplication.h.
|
protected |
Definition at line 940 of file ExampleApplication.h.
|
protected |
Definition at line 928 of file ExampleApplication.h.
|
protected |
Definition at line 941 of file ExampleApplication.h.
|
protected |
Definition at line 935 of file ExampleApplication.h.
|
protected |
Definition at line 938 of file ExampleApplication.h.
|
protected |
Definition at line 936 of file ExampleApplication.h.
|
protected |
Definition at line 932 of file ExampleApplication.h.
|
protected |
Definition at line 933 of file ExampleApplication.h.
|
protected |
Definition at line 860 of file ExampleApplication.h.
|
protected |
Definition at line 861 of file ExampleApplication.h.
|
protected |
Definition at line 997 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_loadedSceneFile |
Definition at line 973 of file ExampleApplication.h.
|
protected |
Definition at line 926 of file ExampleApplication.h.
|
protected |
Definition at line 879 of file ExampleApplication.h.
|
protected |
Definition at line 852 of file ExampleApplication.h.
|
protected |
Definition at line 867 of file ExampleApplication.h.
|
protected |
Definition at line 987 of file ExampleApplication.h.
|
protected |
Definition at line 968 of file ExampleApplication.h.
|
protected |
Definition at line 969 of file ExampleApplication.h.
|
protected |
Definition at line 893 of file ExampleApplication.h.
|
protected |
Definition at line 970 of file ExampleApplication.h.
|
protected |
Definition at line 917 of file ExampleApplication.h.
|
protected |
Definition at line 927 of file ExampleApplication.h.
|
protected |
Definition at line 915 of file ExampleApplication.h.
|
protected |
Definition at line 875 of file ExampleApplication.h.
|
protected |
Definition at line 963 of file ExampleApplication.h.
|
protected |
Definition at line 876 of file ExampleApplication.h.
|
protected |
Definition at line 955 of file ExampleApplication.h.
|
protected |
Definition at line 952 of file ExampleApplication.h.
|
protected |
Definition at line 967 of file ExampleApplication.h.
|
protected |
Definition at line 847 of file ExampleApplication.h.
|
protected |
Definition at line 849 of file ExampleApplication.h.
|
protected |
Definition at line 866 of file ExampleApplication.h.
|
protected |
Definition at line 854 of file ExampleApplication.h.
| agx::Event agxOSG::ExampleApplication::m_sceneLoadEvent |
Definition at line 976 of file ExampleApplication.h.
|
protected |
Definition at line 848 of file ExampleApplication.h.
|
protected |
Definition at line 850 of file ExampleApplication.h.
|
protected |
Definition at line 900 of file ExampleApplication.h.
|
protected |
Definition at line 958 of file ExampleApplication.h.
|
protected |
Definition at line 895 of file ExampleApplication.h.
|
protected |
Definition at line 898 of file ExampleApplication.h.
|
protected |
Definition at line 901 of file ExampleApplication.h.
|
protected |
Definition at line 841 of file ExampleApplication.h.
|
protected |
Definition at line 863 of file ExampleApplication.h.
|
protected |
Definition at line 954 of file ExampleApplication.h.
|
protected |
Definition at line 882 of file ExampleApplication.h.
|
protected |
Definition at line 992 of file ExampleApplication.h.
|
protected |
Definition at line 964 of file ExampleApplication.h.
|
protected |
Definition at line 878 of file ExampleApplication.h.
|
protected |
Definition at line 877 of file ExampleApplication.h.
|
protected |
Definition at line 956 of file ExampleApplication.h.
|
protected |
Definition at line 918 of file ExampleApplication.h.
|
mutableprotected |
Definition at line 872 of file ExampleApplication.h.
|
protected |
Definition at line 920 of file ExampleApplication.h.
|
protected |
Definition at line 995 of file ExampleApplication.h.
|
protected |
Definition at line 996 of file ExampleApplication.h.
|
protected |
Definition at line 994 of file ExampleApplication.h.
|
protected |
Definition at line 843 of file ExampleApplication.h.
|
protected |
Definition at line 925 of file ExampleApplication.h.
|
protected |
Definition at line 897 of file ExampleApplication.h.