20#pragma clang diagnostic push
21#pragma clang diagnostic ignored "-Wconversion"
32#include <osgViewer/Viewer>
35#include <osg/MatrixTransform>
48#if AGX_USE_WEBSOCKETS()
57#include <agxCFG/ConfigScript.h>
83 class OsgClickAdapter;
92#pragma clang diagnostic pop
97 class StandardManipulator;
98 class MatrixManipulator;
117 class CoSimulationServer;
121 class ExampleApplication;
122 class SceneDecorator;
123 class RenderProxyFactory;
125#if AGX_USE_WEBSOCKETS()
126 class ExampleApplicationController;
138 SceneDescription(BuildScenePtr sc,
bool isTest =
false,
float stop = -1,
bool isSlowUnittest =
false);
141 SceneDescription(
const std::string& scriptFileName,
const std::string& scriptFunctionName,
bool isTest =
false,
float stop = -1,
bool isSlowUnittest =
false);
144 SceneDescription(
const std::string& sceneFile,
bool isTest =
false,
float stop = -1,
bool isSlowUnittest =
false);
159#if defined(OSG_VERSION_GREATER_OR_EQUAL)
160# if OSG_VERSION_GREATER_OR_EQUAL(2,9,11)
198 auto viewport = m_mainCamera->getViewport();
199 m_glCamera->
setViewPort(
static_cast<int>(viewport->width()),
static_cast<int>(m_mainCamera->getViewport()->height()));
201 using osg::Camera::DrawCallback::operator();
204 osg::Camera *m_mainCamera;
212 : m_glLights(mainLights),
213 m_decorator(decorator)
235 using osg::Camera::DrawCallback::operator();
247#if defined(OSG_VERSION_GREATER_OR_EQUAL)
248# if OSG_VERSION_GREATER_OR_EQUAL(2,9,11)
269 SINGLETON_CLASSNAME_METHOD();
270 virtual void shutdown()
override { s_instance =
nullptr; }
271 osgViewer::GraphicsWindow*
getWindow( osgViewer::Viewer* viewer,
size_t num = 0 )
const;
297 void applyTo( osgViewer::Viewer* viewer )
const;
312 void initialize(
const osg::Camera* camera );
345 MAIN_SCENE_MASK = 1 << 1,
346 DEBUG_RENDER_MASK = 1 << 2,
347 OSG_RENDER_MASK = 1 << 3,
349 DECORATOR_MASK = 1 << 5,
350 CASTS_SHADOWS_MASK = 1 << 6,
351 RECIEVES_SHADOWS_MASK = 1 << 7
390 bool init(
int argc,
char** argv );
400 bool addScene(
const std::string& scriptFile,
const std::string& scriptFunction,
int key,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
401 bool addScene(
const std::string& scriptFile,
const std::string& scriptFunction,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
403 bool addScene( BuildScenePtr sceneFunction,
int key,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
404 bool addScene( BuildScenePtr sceneFunction,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
411 #if AGX_USE_OPENPLX()
412 m_openplxSceneVector.clear();
414 m_keybindingVector.clear();
445 void stop(
int exitCode = 0) { m_shouldStop =
true; m_exitCode = exitCode; }
471 virtual void setupViewer(
bool lightingEnabled =
true,
bool visibleWindow =
true );
479 void setScene(osg::Group *scene ) { m_scene = scene; }
484#ifdef AGX_HAVE_DEPTHPEELING
485 void setEnableDepthPeeling(
bool flag );
486 bool getEnableDepthPeeling()
const;
487 agxOSG::DepthPeeling* getDepthPeeling();
544#if defined(OSG_VERSION_GREATER_OR_EQUAL)
545# if OSG_VERSION_GREATER_OR_EQUAL(2,9,11)
546 osgGA::CameraManipulator* getCameraManipulator();
547 const osgGA::CameraManipulator* getCameraManipulator()
const;
549 osgGA::MatrixManipulator* getCameraManipulator();
550 const osgGA::MatrixManipulator* getCameraManipulator()
const;
613 osg::Group *
getRoot() {
return m_root.get(); }
617 void initViewer(
int width,
int height,
bool osgWindow =
true);
629 osgViewer::Viewer *
getViewer() {
return m_viewer.get(); }
630 osg::Camera *
getCamera() {
if (m_viewer.valid())
return m_viewer->getCamera();
else return nullptr; }
703 double heading,
double elevation,
double distance,
704 int trackerMode = 0);
716 int trackerMode = 0);
825#if AGX_USE_WEBSOCKETS()
826 agxOSG::ExampleApplicationController *getController();
829 void pushParametersToControlChannel();
830 void setEnableControlChannelTickSignals(
bool flag);
831 void pushFrameToRemoteViewer();
840 agxPython::ScriptContextInterface* initPythonContext(agxPython::ScriptManager *scriptManager);
873 std::vector<std::string> getOpenPlxBundlePaths(
const std::vector<std::string>& extraBundlePaths = {});
878 std::string getOpenPlxModelName();
884 void setOpenPlxModelName(std::string modelName);
889 bool getOpenPlxDebugRenderFrames();
894 bool getOpenPlxUseClick();
899 std::string getOpenPlxClickServerAddr();
917 class SimulationListener;
996#if AGX_USE_WEBSOCKETS()
997 friend class ExampleApplicationController;
999 friend class AutoPauseListener;
1061#ifdef AGX_HAVE_DEPTHPEELING
1062 osg::ref_ptr<DepthPeeling> m_depthPeeling;
1085 bool m_openplxUseClick =
false;
1086 std::string m_openplxClickServerAddr =
"tcp://*:5555";
1088 bool m_openplxDebugRenderFrames =
false;
1089 bool m_openplxEnableDebugLogs =
false;
1091#if AGX_USE_OPENPLX()
1092 std::vector<std::shared_ptr<openplx::Core::Object>> m_openplxSceneVector;
1093 std::unique_ptr<agxopenplx::OsgClickAdapter> m_openplxClickAdapter;
#define AGX_DECLARE_POINTER_TYPES(type)
The geometry representation used by the collision detection engine.
Only use as member allocated variable.
void setViewMatrix(const agx::Matrix4x4 &matrix)
Set the view matrix.
void setViewPort(unsigned width, unsigned height)
void setProjectionMatrix(const agx::Matrix4x4 &matrix)
Set the projection matrix.
const agx::Matrix4x4 & getViewMatrix() const
Get the view matrix.
const agx::Matrix4x4 & getProjectionMatrix() const
Get the projection matrix.
Container class for lights that is used for synchronizing light data with shaders,...
bool setLightDirection(agx::UInt index, const agx::Vec3 &direction)
bool setLightPosition(agx::UInt index, const agx::Vec4 &position)
A small argument parser class.
Class for sending serialized agxSDK::Simulation over to a client.
static CameraManipulatorFactory * s_instance
CameraManipulatorType * create(Types type, osgViewer::GraphicsWindow *window=nullptr)
CameraManipulatorType * next(osgViewer::GraphicsWindow *window=nullptr)
CameraManipulatorType * next(osgViewer::Viewer *viewer=nullptr)
CameraManipulatorType * create(osgViewer::GraphicsWindow *window=nullptr)
osgViewer::GraphicsWindow * getWindow(osgViewer::Viewer *viewer, size_t num=0) const
virtual void shutdown() override
Implement this method to cleanup your Singleton class.
CameraManipulatorType * create(osgViewer::Viewer *viewer=nullptr)
CameraManipulatorType * create(Types type, osgViewer::Viewer *viewer=nullptr)
CameraManipulatorFactory()
static CameraManipulatorFactory * instance()
virtual void operator()(osg::RenderInfo &) const
CameraSynchronization(osg::Camera *mainCamera, agxGL::Camera *glCamera)
virtual ~CameraSynchronization()
virtual ~ExampleApplicationListener() override
virtual void postFrame(ExampleApplication *app)
virtual void preFrame(ExampleApplication *app)
Class that encapsulates rendering and simulation using OpenSceneGraph.
agx::Real getTimeStamp() const
KeyBindingsVector m_keybindingVector
agx::Real calculateStopTime(const SceneDescription &desc)
agxOSG::RenderProxyFactory * m_renderProxyFactory
osgGA::MatrixManipulator * getCameraManipulator()
void setupImageCaptureRenderToTexture()
bool init(int argc, char **argv)
RenderTargetRefVector m_renderTargetSet
bool breakRequested() const
osg::ref_ptr< osg::GraphicsContext > m_pBuffer
SceneDescription getCallback(int key)
bool getEnableSimulationDump() const
bool executeOneStepWithoutGraphics()
agxJson::Value extractSimulationStructureToJson()
agxGL::CameraRef m_GlCamera
agx::Vector< agx::String > m_timelineFormats
agx::Real m_profilingFrequency
bool executeOneStepWithoutGraphics(bool &saveAfterEnabled, agx::Real saveAfterTime, agx::HighAccuracyTimer &timer)
agx::HashSet< agxCollide::GeometryPair > m_autoPausePairs
bool getRealTimeSync() const
void removeAutoPausePair(const agx::RigidBody *body1, const agx::RigidBody *body2)
bool getEnableJournalIncrementalStructure() const
agx::Mutex m_serviceMutex
bool m_coordinateSystemEnabled
bool getEnableCoordinateSystem() const
Is the visual coordinate system enabled/disabled?
RenderToTextureRef m_imageCaptureRenderToTexture
agx::UInt m_journalFormat
void executeWithoutGraphics()
agx::Vec2u getGridResolution() const
Gets the grid resolution for the visual grid.
void initThreadTimeline()
agx::Event m_sceneLoadEvent
agxOSG::RenderProxyFactory * getRenderProxyFactory()
std::string m_journalSessionName
osg::ref_ptr< osg::Switch > m_sceneSwitch
void setEnableJournal32bitMode(bool enable)
Set to true if journal should save data in 32bit float.
void setArgumentsPostSceneCreation()
std::string m_sceneFilename
bool m_interactiveRemoteClient
void throttleIdleCpuUsageBySleeping()
bool isCameraHomeSet() const
std::string m_xmlPlotFile
agxCFG::ConfigScriptRef m_settings
agxOSG::ImageCaptureRef m_imageCapture
bool m_generateTaskProfile
agx::Journal * getJournal()
void initRemoteCommandServer(agxIO::ArgumentParser *arguments)
agx::RealVector m_coSimulationOutputData
bool m_enableTerrainJournalRecording
static void registerRemovedGeometry(GeometryNode *node)
PickHandler * getPickHandler()
void stopAfter(const agx::Real stopTime)
Lets the application stop after a certain simulation time.
void setSolverType(SolverType t)
agxSDK::Simulation * getSimulation()
AutoStepEvent autoStepEvent
osg::ref_ptr< osgViewer::Viewer > m_viewer
std::string m_openplxModelName
void getCameraHome(agx::Vec3 &eye, agx::Vec3 ¢er, agx::Vec3 &up)
osg::ref_ptr< osg::Geode > m_grid
void setOsgNotifyLevel(osg::NotifySeverity severity) const
agx::ref_ptr< agx::Referenced > m_debugClient
StatisticsRendererRef m_statisticsRenderer
void cancelStop()
Will cancel the stop if possible. Continue the run loop.
bool done() const
If no graphics is used, this method always return false.
osg::ref_ptr< osg::Camera > m_pBufferCamera
agx::Vec3 m_cameraHomeEye
std::string getProfilingJournalPath() const
void initScene(osg::Group *root)
void synchronizedStep(bool blocking=false)
bool getAutoStepping() const
Should the application step automatically? False for 'pause', true for 'play'.
SolverType getSolverType(const std::string &name) const
void setTargetFPS(double fps)
Specify number of graphic window updates per second.
agx::RealModeEnum m_journalRealMode
std::string m_journalEofMode
const PickHandler * getPickHandler() const
agx::Real getTimeStep() const
void createPreviousScene()
osg::Group * executeMPyScript(const agx::String &file, bool &success)
bool attachScripts(osg::Group *root)
virtual ~ExampleApplication()
agxGL::LightsRef m_GlLights
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.
bool hasRenderContext() const
This is will return false if -a / –agxOnly is specified.
osgViewer::Viewer * getViewer()
bool addScene(SceneDescription sceneDescription)
void createVisual(agxSDK::Assembly *assembly, float detailRatio=1.0f, bool createAxes=false)
agx::Mutex & getFrameMutex()
void initSimulation(agxSDK::Simulation *simulation=nullptr, bool initializeGraphics=true)
bool getEnableTextDebugRendering() const
void setEnablePauseUpdate(bool flag)
std::string m_journalPlaybackPath
agx::Real m_journalStartTime
void setOrbitCamera(agxOSG::GeometryNode *node, double heading, double elevation, double distance, int trackerMode=0)
Sets an orbit camera following an node.
osg::Camera * getTextureCamera()
std::string m_coSimulationInputFile
void createVisual(agxSDK::Simulation *simulation, float detailRatio=1.0f, bool createAxes=false)
bool m_autoCycleThroughScenes
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.
bool hasOffscreenWindow() const
void updateRemoteDebugger()
void setEnableVSync(bool flag, bool forceUpdate=false)
VideoFFMPEGPipeCaptureRef m_videoCapture
void setEnableCoordinateSystem(bool flag)
Enables/disables the visual coordinate system.
void setupVideoCaptureRenderTotexture()
osg::Group * createScene(const SceneDescription &desc, bool &success)
bool updatePythonCoSimulationServer(const agx::String &filename, std::stringstream &buffer)
void updateCoSimulationServer()
bool getAllowWindowResizing() const
Is window resizing allowed?
void initViewer(int width, int height, bool osgWindow=true)
void executeWithGraphics()
osg::ref_ptr< agxOSG::SceneDecorator > m_decorator
void journalRenderLoader(agxSDK::Assembly *assembly, bool keyFrame)
void foundIncrementalArchive(agx::Journal *journal)
bool getEnableOSGRenderer()
void setEnableTextDebugRendering(bool flag)
agx::Vec2T< int > m_windowSize
void listSessionNames(const std::string &journalToList)
void drawCoordinateSystem()
void removeAutoPausePair(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2)
agxOSG::VideoFFMPEGPipeCapture * getVideoServerCapture()
void setEnableSimulationDump(bool flag)
agx::Vec2 getGridSize() const
Gets the grid size for the visual grid.
agxOSG::SceneDecorator * getSceneDecorator()
agx::ref_ptr< agx::Referenced > m_journal
void setScene(osg::Group *scene)
void setEnableJournalRecord(bool enable)
Set if a journal should be recorded from the simulation.
CameraMask
Specifies node masks for different parts of the rendering scene.
bool m_explicitJournalConfigurationPath
agx::Vec3 m_cameraHomeCenter
void journalSceneLoader(const agx::String &path)
agxSDK::ContactEventListenerRef m_autoPauseListener
bool m_generateThreadTimeline
agx::UInt getJournalFormat() const
Gets journal format.
bool m_allowWindowResizing
std::string m_journalConfigurationPath
bool executeOneStepWithGraphics(bool &saveAfterEnabled, agx::Real saveAfterTime, agx::HighAccuracyTimer &timer)
bool addScene(const std::string &scriptFile, const std::string &scriptFunction, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false)
void handleReactiveScriptErrors(bool abortSimulation=true)
void setEnableThreadTimeline(bool flag)
std::string getScriptFile() const
osg::Group * getSceneSwitch()
agx::Timer m_frameSleepTimer
osg::ref_ptr< osg::Camera > m_textureCamera
void setEnableJournalIncrementalStructure(bool enable)
bool coSimulationCallPython(agxNet::CoSimulationServer *server)
agxOSG::RigidBodyRenderCacheRef m_cache
void setQuitEventSetsDone(bool flag)
If set to true (default) pressing the ESC key will exit the run loop and application will shut down.
void addGranularCreateVisualCallbacks()
void storeInitialJournalState()
bool getEnablePauseUpdate() const
agxOSG::RenderToTexture * getVideoCaptureRendertoTexture()
std::string m_extractSimulationStructureToJsonPath
agxOSG::CameraData getCameraData() const
agx::Vec3 getViewDirection()
osg::ref_ptr< osg::Group > m_scene
bool getEnableGrid() const
Is the visual grid enabled/disabled?
const std::string & getJournalPlaybackPath() const
bool getQuitEventSetsDone() const
double getTargetFPS()
Retrieve current number of graphic window updates per second, if <= 0 no throttling is done.
bool addScene(SceneDescription sceneDescription, int key)
void setDebugRenderInverseMatrix(const agx::AffineMatrix4x4 &m)
Transform the debug rendering AND pick handler origin by this matrix.
PickHandlerRef m_pickHandler
void setGridResolution(const agx::Vec2u gridResolution)
Sets the grid resolution for the visual grid.
ExampleApplication(agxSDK::Simulation *simulation=nullptr)
Constructor.
void setCameraHome(const agx::Vec3 &eye, const agx::Vec3 ¢er, const agx::Vec3 &up=agx::Vec3(0, 0, 1))
agx::AffineMatrix4x4 m_coordinateSystemTransform
agx::Callback m_stepCallback
void setJournalConfigurationPath(const agx::String &path)
void setGridSize(const agx::Vec2 &gridSize)
Sets the grid size for the visual grid.
bool m_enableJournalRecording
osg::Group * getSceneAgxOSGRoot()
std::vector< std::string > m_openplxAddBundlePath
const agxOSG::ImageCapture * getImageCapture() const
void setAutoStepping(bool flag, bool resetTimer=true)
Should the application step automatically? False for 'pause', true for 'play'.
void applyInitialParameters(const std::string &filePath)
void setStepCallback(agx::Callback callback)
void setTimeStep(agx::Real dt)
osg::ref_ptr< osg::Group > m_root
osg::ref_ptr< osg::Group > m_sceneRoot
bool addScene(BuildScenePtr sceneFunction, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false)
void addRenderTarget(agxOSG::RenderTarget *rtt, osg::Node *targetSceneNode=nullptr)
Add a render target to the current viewer.
void granularCreated(agxSDK::Simulation *sim, agx::RigidBody *body)
bool init(agxIO::ArgumentParser *arguments, bool agxOnly=false)
void setEnableTaskProfile(bool flag)
agx::Vec2u m_gridResolution
bool setEnableDebugRenderer(bool flag)
Set enabling the debug renderer.
osg::Camera * getCamera()
void addListener(ExampleApplicationListener *listener)
agx::ref_ptr< agx::Referenced > m_controller
void setEnableGrid(bool flag)
Enables/disables the visual grid.
bool addScene(const std::string &scriptFile, const std::string &scriptFunction, int key, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false)
bool setWindowRectangle(unsigned int x, unsigned int y, unsigned int width, unsigned int height)
Set the position and size of the window.
size_t getNumScenes() const
bool m_autoPausingEnabled
agxIO::ArgumentParser * getArguments()
void applyCameraData(const agxOSG::CameraData &cameraData)
Apply camera data.
void triggerPreFrameListeners()
std::string getSolverName(SolverType t) const
bool createSceneFromIndex(int idx, bool firstStartUp=false)
SceneDescription getCallbackIdx(size_t idx)
bool useCoSimulation() const
virtual void setupViewer(bool lightingEnabled=true, bool visibleWindow=true)
agx::RealVector m_coSimulationInputData
std::string m_coSimulationOutputFile
std::string m_journalRecordPath
agx::Vector< ExampleApplicationListenerRef > m_listeners
const osgGA::MatrixManipulator * getCameraManipulator() const
agxSDK::Simulation::RigidBodyEvent::CallbackType m_addBodyCallback
void setRequestedJournalFrequency(agx::Real freq)
Set the requested recording frequency for attached journal.
agxSDK::GraphicsThrottler m_gfxThrottler
agx::Real m_relativeStopTime
bool getEnableVSync() const
void removeGeometryNode(agxSDK::Simulation *, agxCollide::Geometry *)
agx::Journal::FrameJumpEvent::CallbackType m_foundIncrementalArchiveCallback
osg::Group * executePythonScript(const agx::String &file, const agx::String &function, bool &success)
Execute a python script file with a named function.
std::string m_pythonFilePath
agx::Callback getStepCallback() const
void addAutoPausePair(const agxCollide::Geometry *geometry1, const agxCollide::Geometry *geometry2)
agx::Vector< SceneDescription > KeyBindingsVector
void setEnableAutoPausing(bool flag)
Enable/disable auto-pausing.
agx::Real m_journalFrequency
osg::ref_ptr< osg::MatrixTransform > m_coordinateSystem
void setRealTimeSync(bool flag)
Should ExampleApplication try to hold simulation in real time? Will wait for wall clock if going to f...
void takeScreenShot(const agx::String &filename="")
Takes a screen shot of the scene.
std::string m_profilingRoot
void setJournalFormat(agx::UInt journalFormat)
Sets journal format. Only valid before starting journal recording/playback.
agx::AffineMatrix4x4 getCoordinateSystemTransform() const
Gets the transformation for the visual coordinate system and grid.
osg::ref_ptr< agxOSG::GuiEventAdapter > m_eventAdapter
void setEnableOSGRenderer(bool flag)
void triggerPostFrameListeners()
agx::Vec3 getGravity() const
agx::HashTable< int, int > KeyBindings
SolverType getSolverType() const
void setAllowWindowResizing(bool flag)
Set if window resizing should be allowed.
bool setWindowTitle(const std::string &title)
Set the title of the window.
std::string m_parameterFilePath
void clearAddedScenes()
Remove all added scenes.
agxSDK::Simulation::GeometryEvent::CallbackType m_removeGeometryCallback
const std::string & getSaveSceneFilename() const
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 el...
osg::Group * getSceneRoot()
agx::Event1< bool > AutoStepEvent
void generateQuickProfiling()
agx::Real m_journalStopTime
bool addScene(BuildScenePtr sceneFunction, int key, bool isPartofUnitTest=true, float stopAfter=-1, bool isSlowUnittest=false)
agxIO::ArgumentParserRef m_arguments
void setCoordinateSystemTransform(const agx::AffineMatrix4x4 &coordinateSystemTransform)
Sets the transformation for the visual coordinate system and grid.
void stop(int exitCode=0)
Stop (=exit) the application at next opportunity.
bool m_enableJournalIncrementalStructure
KeyBindings m_keyBindings
void setJournalRecordPath(const agx::String &journalPath)
Set the path for the recorded journal.
agxSDK::SimulationRef m_simulation
agxOSG::ImageCapture * getImageCapture()
agx::Real m_journalRecordStartTime
agx::ref_ptr< agx::Referenced > m_coSimulationServer
bool getEnableDebugRenderer() const
Is the debug renderer enabled? Will also return false if no simulation exists.
bool initArguments(agxIO::ArgumentParser *arguments, bool agxOnly)
bool createSceneFromKey(int key)
const std::string & getJournalConfigurationPath() const
bool removeRenderTarget(agxOSG::RenderTarget *rtt)
Remove a specified renderTarget.
void setEnableCaptureSyncWithSimulation(bool enableSync)
bool restoreFromFile(const std::string &filename)
bool getEnableAutoPausing()
agx::Vector< std::pair< std::string, int > > m_attachedScripts
agx::HighAccuracyTimer m_stepTimer
bool getEnableCaptureSyncWithSimulation() const
RenderToTextureRef m_videoCaptureRenderToTexture
A node that can be associated with a collision geometry so that the transformation of this node is up...
LightsSynchronization(agxGL::Lights *mainLights, agxOSG::SceneDecorator *decorator)
virtual void operator()(osg::RenderInfo &) const
virtual ~LightsSynchronization()
Implementation of the abstract class from the agxRender namespace, this class is responsible for crea...
Render target is used for rendering camera content to a buffer, either a DEPTH or COLOR target.
Decorates a scene with a specific AGX Rendering Style.
agxOSG::LightSource getLightSource(Lights l)
Get a wrapper for a LightSource with only AGX types.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Class to throttle a task to a specific frequency (fps).
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Block synchronization primitive.
Generalized callback, using std::function.
An event with one argument.
An event with no arguments.
Inheritance with partial specialization due to bug with ref_ptr containers.
The HighAccurayTimer class can replace the regular Timer class in high level applications where the n...
Inheritance with partial specialization due to bug with ref_ptr containers.
Matrix class for affine transformations.
Base class providing referencing counted objects.
The rigid body class, combining a geometric model and a frame of reference.
Base class for Singletons that should have its shutdown called explicitly before exit of the applicat...
The Timer class permits timing execution speed with the same refinement as the built in hardware cloc...
The return type of functions that load a .openplx file.
modelName - if set a specific model from the source/file will be loaded instead of the default uuidv5...
This namespace contains functionality for using AGX together with version 2 of the Functional Mockup ...
Containins classes for sending/reading data over sockets as well as compression functionality.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
osgGA::MatrixManipulator CameraManipulatorType
osg::Group *(* BuildScenePtr)(agxSDK::Simulation *simulation, ExampleApplication *application)
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
RealModeEnum
The data type for basic floating point representation.
void applyTo(osgViewer::Viewer *viewer) const
Apply current settings to a viewer which assigns home position of the camera manipulator.
CameraData(const osg::Camera *camera)
Uses camera view matrix for eye, center and up.
CameraData(const osgViewer::Viewer *viewer)
Uses camera manipulator for eye, center and up.
void applyTo(osg::Camera *camera) const
Apply current settings to a camera.
A pod-struct for holding information about scenes to load by the application.
SceneDescription(const std::string &sceneFile, bool isTest=false, float stop=-1, bool isSlowUnittest=false)
Creates a scene from any kind of agx-readable file.
SceneDescription(const std::string &scriptFileName, const std::string &scriptFunctionName, bool isTest=false, float stop=-1, bool isSlowUnittest=false)
Creates a scene from a script file and a function within the file.
SceneDescription()
A non-valid scene.
std::string scriptFunction
SceneDescription(BuildScenePtr sc, bool isTest=false, float stop=-1, bool isSlowUnittest=false)
Creates a scene from a function pointer.