20#pragma clang diagnostic push
21#pragma clang diagnostic ignored "-Wconversion"
24#include <agx/config/AGX_USE_OPENGL.h>
25#include <agx/config/AGX_USE_FFMPEG.h>
26#include <agx/config/AGX_USE_PYTHON.h>
28#include <agx/config.h>
32#include <osgViewer/Viewer>
35#include <osg/MatrixTransform>
48#if AGX_USE_WEBSOCKETS()
57#include <agxCFG/ConfigScript.h>
76# include <agx/config/AGX_PYTHON_VERSION.h>
80#pragma clang diagnostic pop
85 class StandardManipulator;
86 class MatrixManipulator;
105 class CoSimulationServer;
109 class ExampleApplication;
110 class SceneDecorator;
111 class RenderProxyFactory;
113#if AGX_USE_WEBSOCKETS()
114 class ExampleApplicationController;
126 SceneDescription(BuildScenePtr sc,
bool isTest =
false,
float stop = -1,
bool isSlowUnittest =
false);
129 SceneDescription(
const std::string& scriptFileName,
const std::string& scriptFunctionName,
bool isTest =
false,
float stop = -1,
bool isSlowUnittest =
false);
132 SceneDescription(
const std::string& sceneFile,
bool isTest =
false,
float stop = -1,
bool isSlowUnittest =
false);
147#if defined(OSG_VERSION_GREATER_OR_EQUAL)
148# if OSG_VERSION_GREATER_OR_EQUAL(2,9,11)
186 auto viewport = m_mainCamera->getViewport();
187 m_glCamera->
setViewPort(
static_cast<int>(viewport->width()),
static_cast<int>(m_mainCamera->getViewport()->height()));
189 using osg::Camera::DrawCallback::operator();
192 osg::Camera *m_mainCamera;
200 : m_glLights(mainLights),
201 m_decorator(decorator)
223 using osg::Camera::DrawCallback::operator();
235#if defined(OSG_VERSION_GREATER_OR_EQUAL)
236# if OSG_VERSION_GREATER_OR_EQUAL(2,9,11)
257 SINGLETON_CLASSNAME_METHOD();
258 virtual void shutdown()
override { s_instance =
nullptr; }
259 osgViewer::GraphicsWindow*
getWindow( osgViewer::Viewer* viewer,
size_t num = 0 )
const;
285 void applyTo( osgViewer::Viewer* viewer )
const;
300 void initialize(
const osg::Camera* camera );
333 MAIN_SCENE_MASK = 1 << 1,
334 DEBUG_RENDER_MASK = 1 << 2,
335 OSG_RENDER_MASK = 1 << 3,
337 DECORATOR_MASK = 1 << 5,
376 bool init(
int argc,
char** argv );
386 bool addScene(
const std::string& scriptFile,
const std::string& scriptFunction,
int key,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
387 bool addScene(
const std::string& scriptFile,
const std::string& scriptFunction,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
389 bool addScene( BuildScenePtr sceneFunction,
int key,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
390 bool addScene( BuildScenePtr sceneFunction,
bool isPartofUnitTest=
true,
float stopAfter=-1,
bool isSlowUnittest=
false );
426 void stop(
int exitCode = 0) { m_shouldStop =
true; m_exitCode = exitCode; }
452 virtual void setupViewer(
bool lightingEnabled =
true,
bool visibleWindow =
true );
459 void setScene(osg::Group *scene ) { m_scene = scene; }
464#ifdef AGX_HAVE_DEPTHPEELING
465 void setEnableDepthPeeling(
bool flag );
466 bool getEnableDepthPeeling()
const;
467 agxOSG::DepthPeeling* getDepthPeeling();
517#if defined(OSG_VERSION_GREATER_OR_EQUAL)
518# if OSG_VERSION_GREATER_OR_EQUAL(2,9,11)
519 osgGA::CameraManipulator* getCameraManipulator();
520 const osgGA::CameraManipulator* getCameraManipulator()
const;
522 osgGA::MatrixManipulator* getCameraManipulator();
523 const osgGA::MatrixManipulator* getCameraManipulator()
const;
586 osg::Group *
getRoot() {
return m_root.get(); }
590 void initViewer(
int width,
int height,
bool osgWindow =
true);
603 osgViewer::Viewer *
getViewer() {
return m_viewer.get(); }
604 osg::Camera *
getCamera() {
if (m_viewer.valid())
return m_viewer->getCamera();
else return nullptr; }
677 double heading,
double elevation,
double distance,
678 int trackerMode = 0);
690 int trackerMode = 0);
799#if AGX_USE_WEBSOCKETS()
800 agxOSG::ExampleApplicationController *getController();
803 void pushParametersToControlChannel();
804 void setEnableControlChannelTickSignals(
bool flag);
805 void pushFrameToRemoteViewer();
814 agxPython::ScriptContextInterface* initPythonContext(agxPython::ScriptManager *scriptManager);
847 class SimulationListener;
927#if AGX_USE_WEBSOCKETS()
928 friend class ExampleApplicationController;
930 friend class AutoPauseListener;
992#ifdef AGX_HAVE_DEPTHPEELING
993 osg::ref_ptr<DepthPeeling> m_depthPeeling;
#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()
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
GraphicsThrottler m_gfxThrottler
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?
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()
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
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.
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 validateGranularLicenseLimits()
bool getEnableOSGRenderer()
void setEnableTextDebugRendering(bool flag)
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()
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.
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 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)
std::string m_cfgFileName
bool getEnableAutoPausing()
agx::Vector< std::pair< std::string, int > > m_attachedScripts
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,...
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...
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.