|
AGXDynamics
2.31.1.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 | 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=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 (BuildScenePtr sceneFunction, int key, bool isPartofUnitTest=true, float stopAfter=float(), bool isSlowUnittest=false) |
| bool | addScene (BuildScenePtr sceneFunction, bool isPartofUnitTest=true, float stopAfter=float(), bool isSlowUnittest=false) |
| bool | addScene (SceneDescription sceneDescription, int key) |
| bool | addScene (SceneDescription sceneDescription) |
| void | applyCameraData (const agxOSG::CameraData &cameraData) |
| Apply camera data. More... | |
| 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 |
| bool | breakRequested () const |
| 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 () |
| 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::UInt16 | getControlChannelPort () |
| agxOSG::ExampleApplicationController * | getController () |
| 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::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 |
| bool | getQuitEventSetsDone () const |
| bool | getRealTimeSync () const |
| int | getReferenceCount () 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 |
| agxPython::ScriptContextInterface * | initPythonContext (agxPython::ScriptManager *scriptManager) |
| 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) |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isCameraHomeSet () const |
| void | journalPlayback () |
| void | journalRenderLoader (agxSDK::Assembly *assembly, bool keyFrame) |
| void | listSessionNames (const std::string &journalToList) |
| void | postExecution () |
| void | pushFrameToRemoteViewer () |
| void | pushParametersToControlChannel () |
| bool | readCFGFile () |
| 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 | 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 | setEnableControlChannelTickSignals (bool flag) |
| 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 | 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 | 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 | 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... | |
| void | updateCoSimulationServer () |
| bool | updatePythonCoSimulationServer (const agx::String &filename, std::stringstream &buffer) |
| void | updateRemoteDebugger () |
| void | updateServices () |
| bool | useCoSimulation () const |
Static Public Member Functions | |
| static void | registerRemovedGeometry (GeometryNode *node) |
| 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 |
Static Protected Member Functions | |
| 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 303 of file ExampleApplication.h.
| typedef agx::Event1<bool> agxOSG::ExampleApplication::AutoStepEvent |
Definition at line 306 of file ExampleApplication.h.
|
protected |
Definition at line 809 of file ExampleApplication.h.
|
protected |
Definition at line 811 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 314 of file ExampleApplication.h.
| Enumerator | |
|---|---|
| MULTI | |
| ITERATIVE | |
| NUM_SOLVERS | |
Definition at line 323 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 | ||
| ) |
| 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 = 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 | ( | BuildScenePtr | sceneFunction, |
| int | key, | ||
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = float(), |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | BuildScenePtr | sceneFunction, |
| bool | isPartofUnitTest = true, |
||
| float | stopAfter = float(), |
||
| bool | isSlowUnittest = false |
||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | SceneDescription | sceneDescription, |
| int | key | ||
| ) |
| bool agxOSG::ExampleApplication::addScene | ( | SceneDescription | sceneDescription | ) |
|
protectedinherited |
| void agxOSG::ExampleApplication::applyCameraData | ( | const agxOSG::CameraData & | cameraData | ) |
Apply camera data.
Typically: camData = app->getCameraData(); camData.nearClippingPlane = 0.01f; app->applyCameraData( camData );
|
protected |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
protected |
| bool agxOSG::ExampleApplication::breakRequested | ( | ) | const |
| void agxOSG::ExampleApplication::centerScene | ( | ) |
| void agxOSG::ExampleApplication::changeSolver | ( | ) |
|
inline |
Remove all added scenes.
Definition at line 377 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 |
||
| ) |
|
protectedinherited |
| 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 |
|
protected |
|
protected |
|
protected |
|
protected |
| void agxOSG::ExampleApplication::fitSceneIntoView | ( | ) |
|
protected |
| bool agxOSG::ExampleApplication::getAllowWindowResizing | ( | ) | const |
Is window resizing allowed?
|
inline |
Definition at line 360 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 556 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::UInt16 agxOSG::ExampleApplication::getControlChannelPort | ( | ) |
| agxOSG::ExampleApplicationController* agxOSG::ExampleApplication::getController | ( | ) |
| agx::AffineMatrix4x4 agxOSG::ExampleApplication::getCoordinateSystemTransform | ( | ) | const |
Gets the transformation for the visual coordinate system and grid.
|
staticprotectedinherited |
| 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 500 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::getEnableSimulationDump | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableTextDebugRendering | ( | ) | const |
| bool agxOSG::ExampleApplication::getEnableVSync | ( | ) | const |
|
inline |
Definition at line 752 of file ExampleApplication.h.
|
inline |
Definition at line 604 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 607 of file ExampleApplication.h.
|
inline |
Definition at line 608 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 580 of file ExampleApplication.h.
| size_t agxOSG::ExampleApplication::getNumScenes | ( | ) | const |
|
inline |
Definition at line 574 of file ExampleApplication.h.
|
inline |
Definition at line 575 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::getQuitEventSetsDone | ( | ) | const |
| bool agxOSG::ExampleApplication::getRealTimeSync | ( | ) | const |
|
inherited |
|
inline |
Definition at line 362 of file ExampleApplication.h.
|
inline |
Definition at line 538 of file ExampleApplication.h.
|
inline |
Definition at line 536 of file ExampleApplication.h.
|
inline |
Definition at line 415 of file ExampleApplication.h.
| osg::Group* agxOSG::ExampleApplication::getSceneAgxOSGRoot | ( | ) |
|
inline |
Definition at line 384 of file ExampleApplication.h.
|
inline |
Definition at line 417 of file ExampleApplication.h.
|
inline |
Definition at line 419 of file ExampleApplication.h.
|
inline |
Definition at line 577 of file ExampleApplication.h.
|
inline |
Definition at line 486 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::getSolverName | ( | SolverType | t | ) | const |
|
inline |
Definition at line 332 of file ExampleApplication.h.
| SolverType agxOSG::ExampleApplication::getSolverType | ( | const std::string & | name | ) | const |
|
inline |
Definition at line 379 of file ExampleApplication.h.
|
inline |
Definition at line 612 of file ExampleApplication.h.
| agx::Real agxOSG::ExampleApplication::getTimeStamp | ( | ) | const |
| agx::Real agxOSG::ExampleApplication::getTimeStep | ( | ) | const |
|
inline |
Definition at line 738 of file ExampleApplication.h.
|
inline |
Definition at line 610 of file ExampleApplication.h.
| agx::Vec3 agxOSG::ExampleApplication::getViewDirection | ( | ) |
|
inline |
Definition at line 555 of file ExampleApplication.h.
| 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 382 of file ExampleApplication.h.
| agxPython::ScriptContextInterface* agxOSG::ExampleApplication::initPythonContext | ( | agxPython::ScriptManager * | scriptManager | ) |
| 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 |
||
| ) |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
|
inline |
Definition at line 615 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 | ( | ) |
| void agxOSG::ExampleApplication::pushFrameToRemoteViewer | ( | ) |
| void agxOSG::ExampleApplication::pushParametersToControlChannel | ( | ) |
| bool agxOSG::ExampleApplication::readCFGFile | ( | ) |
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
Referenced by agxData::Val< UInt >::Val().
|
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).
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
| void agxOSG::ExampleApplication::setEnableAutoPausing | ( | bool | flag | ) |
Enable/disable auto-pausing.
| void agxOSG::ExampleApplication::setEnableCaptureSyncWithSimulation | ( | bool | enableSync | ) |
| void agxOSG::ExampleApplication::setEnableControlChannelTickSignals | ( | bool | flag | ) |
| 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 499 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.
Sets the grid size for the visual grid.
| void agxOSG::ExampleApplication::setJournalConfigurationPath | ( | const agx::String & | path | ) |
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.
Set the requested recording frequency for attached journal.
|
inline |
Definition at line 416 of file ExampleApplication.h.
|
inline |
Definition at line 331 of file ExampleApplication.h.
|
inline |
Definition at line 380 of file ExampleApplication.h.
| 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 |
|
inline |
Definition at line 394 of file ExampleApplication.h.
| void agxOSG::ExampleApplication::step | ( | ) |
| void agxOSG::ExampleApplication::stepSimulation | ( | ) |
| void agxOSG::ExampleApplication::stepWrapper | ( | ) |
|
inline |
Stop (=exit) the application at next opportunity.
Definition at line 391 of file ExampleApplication.h.
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".
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
| 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 602 of file ExampleApplication.h.
|
staticinherited |
| AutoStepEvent agxOSG::ExampleApplication::autoStepEvent |
Definition at line 307 of file ExampleApplication.h.
|
protected |
Definition at line 834 of file ExampleApplication.h.
|
protected |
Definition at line 911 of file ExampleApplication.h.
|
protected |
Definition at line 817 of file ExampleApplication.h.
|
protected |
Definition at line 896 of file ExampleApplication.h.
|
protected |
Definition at line 833 of file ExampleApplication.h.
|
protected |
Definition at line 827 of file ExampleApplication.h.
|
protected |
Definition at line 844 of file ExampleApplication.h.
|
protected |
Definition at line 843 of file ExampleApplication.h.
|
protected |
Definition at line 842 of file ExampleApplication.h.
|
protected |
Definition at line 866 of file ExampleApplication.h.
|
protected |
Definition at line 865 of file ExampleApplication.h.
|
protected |
Definition at line 864 of file ExampleApplication.h.
|
protected |
Definition at line 867 of file ExampleApplication.h.
|
protected |
Definition at line 823 of file ExampleApplication.h.
|
protected |
Definition at line 897 of file ExampleApplication.h.
|
protected |
Definition at line 935 of file ExampleApplication.h.
|
protected |
Definition at line 932 of file ExampleApplication.h.
|
protected |
Definition at line 929 of file ExampleApplication.h.
|
protected |
Definition at line 875 of file ExampleApplication.h.
|
protected |
Definition at line 873 of file ExampleApplication.h.
|
protected |
Definition at line 876 of file ExampleApplication.h.
|
protected |
Definition at line 874 of file ExampleApplication.h.
|
protected |
Definition at line 856 of file ExampleApplication.h.
|
protected |
Definition at line 857 of file ExampleApplication.h.
|
protected |
Definition at line 793 of file ExampleApplication.h.
|
protected |
Definition at line 912 of file ExampleApplication.h.
|
protected |
Definition at line 938 of file ExampleApplication.h.
|
protected |
Definition at line 937 of file ExampleApplication.h.
|
protected |
Definition at line 903 of file ExampleApplication.h.
|
protected |
Definition at line 919 of file ExampleApplication.h.
|
protected |
Definition at line 795 of file ExampleApplication.h.
|
protected |
Definition at line 855 of file ExampleApplication.h.
|
protected |
Definition at line 940 of file ExampleApplication.h.
|
protected |
Definition at line 882 of file ExampleApplication.h.
|
protected |
Definition at line 889 of file ExampleApplication.h.
|
protected |
Definition at line 909 of file ExampleApplication.h.
|
protected |
Definition at line 907 of file ExampleApplication.h.
|
protected |
Definition at line 871 of file ExampleApplication.h.
|
protected |
Definition at line 869 of file ExampleApplication.h.
|
protected |
Definition at line 861 of file ExampleApplication.h.
|
protected |
Definition at line 862 of file ExampleApplication.h.
|
protected |
Definition at line 859 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 930 of file ExampleApplication.h.
|
protected |
Definition at line 931 of file ExampleApplication.h.
|
protected |
Definition at line 910 of file ExampleApplication.h.
| std::string agxOSG::ExampleApplication::m_hostName |
Definition at line 926 of file ExampleApplication.h.
|
protected |
Definition at line 798 of file ExampleApplication.h.
|
protected |
Definition at line 822 of file ExampleApplication.h.
|
protected |
Definition at line 939 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isFMU |
Definition at line 924 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_isLoadingScene |
Definition at line 923 of file ExampleApplication.h.
|
protected |
Definition at line 894 of file ExampleApplication.h.
|
protected |
Definition at line 881 of file ExampleApplication.h.
|
protected |
Definition at line 886 of file ExampleApplication.h.
|
protected |
Definition at line 883 of file ExampleApplication.h.
|
protected |
Definition at line 892 of file ExampleApplication.h.
|
protected |
Definition at line 880 of file ExampleApplication.h.
|
protected |
Definition at line 893 of file ExampleApplication.h.
|
protected |
Definition at line 887 of file ExampleApplication.h.
|
protected |
Definition at line 890 of file ExampleApplication.h.
|
protected |
Definition at line 888 of file ExampleApplication.h.
|
protected |
Definition at line 884 of file ExampleApplication.h.
|
protected |
Definition at line 885 of file ExampleApplication.h.
|
protected |
Definition at line 813 of file ExampleApplication.h.
|
protected |
Definition at line 814 of file ExampleApplication.h.
| bool agxOSG::ExampleApplication::m_loadedSceneFile |
Definition at line 922 of file ExampleApplication.h.
|
protected |
Definition at line 878 of file ExampleApplication.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
protected |
Definition at line 832 of file ExampleApplication.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protected |
Definition at line 805 of file ExampleApplication.h.
|
protected |
Definition at line 820 of file ExampleApplication.h.
|
protected |
Definition at line 936 of file ExampleApplication.h.
|
protected |
Definition at line 916 of file ExampleApplication.h.
|
protected |
Definition at line 917 of file ExampleApplication.h.
|
protected |
Definition at line 846 of file ExampleApplication.h.
|
protected |
Definition at line 918 of file ExampleApplication.h.
|
protected |
Definition at line 879 of file ExampleApplication.h.
|
protected |
Definition at line 868 of file ExampleApplication.h.
|
protected |
Definition at line 828 of file ExampleApplication.h.
|
protected |
Definition at line 913 of file ExampleApplication.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protected |
Definition at line 829 of file ExampleApplication.h.
|
protected |
Definition at line 905 of file ExampleApplication.h.
|
protected |
Definition at line 902 of file ExampleApplication.h.
|
protected |
Definition at line 915 of file ExampleApplication.h.
|
protected |
Definition at line 800 of file ExampleApplication.h.
|
protected |
Definition at line 802 of file ExampleApplication.h.
|
protected |
Definition at line 819 of file ExampleApplication.h.
|
protected |
Definition at line 807 of file ExampleApplication.h.
| agx::Event agxOSG::ExampleApplication::m_sceneLoadEvent |
Definition at line 925 of file ExampleApplication.h.
|
protected |
Definition at line 801 of file ExampleApplication.h.
|
protected |
Definition at line 803 of file ExampleApplication.h.
|
protected |
Definition at line 853 of file ExampleApplication.h.
|
protected |
Definition at line 908 of file ExampleApplication.h.
|
protected |
Definition at line 848 of file ExampleApplication.h.
|
protected |
Definition at line 851 of file ExampleApplication.h.
|
protected |
Definition at line 854 of file ExampleApplication.h.
|
protected |
Definition at line 794 of file ExampleApplication.h.
|
protected |
Definition at line 816 of file ExampleApplication.h.
|
protected |
Definition at line 904 of file ExampleApplication.h.
|
protected |
Definition at line 835 of file ExampleApplication.h.
|
protected |
Definition at line 941 of file ExampleApplication.h.
|
protected |
Definition at line 914 of file ExampleApplication.h.
|
protected |
Definition at line 831 of file ExampleApplication.h.
|
protected |
Definition at line 830 of file ExampleApplication.h.
|
protected |
Definition at line 906 of file ExampleApplication.h.
|
protected |
Definition at line 870 of file ExampleApplication.h.
|
mutableprotected |
Definition at line 825 of file ExampleApplication.h.
|
protected |
Definition at line 872 of file ExampleApplication.h.
|
protected |
Definition at line 944 of file ExampleApplication.h.
|
protected |
Definition at line 945 of file ExampleApplication.h.
|
protected |
Definition at line 943 of file ExampleApplication.h.
|
protected |
Definition at line 796 of file ExampleApplication.h.
|
protected |
Definition at line 877 of file ExampleApplication.h.
|
protected |
Definition at line 850 of file ExampleApplication.h.