AGX Dynamics  2.37.2.0
agxQt::OsgCameraViewManager Class Reference

Manager class that acts as a wrapper container for the CameravViewset class for OSG based view systems. More...

#include <CameraViewSet.h>

+ Inheritance diagram for agxQt::OsgCameraViewManager:

Public Member Functions

 OsgCameraViewManager ()
 Default constructor. More...
 
agx::String getActiveCameraViewName () const
 Returns the active view name. More...
 
CameraDescriptionSet * getCameraDescriptionSet ()
 Returns the internal structure of the camera view set. More...
 
agx::Vector< agx::String > getCameraViewNames ()
 Get the names for all loaded views. More...
 
bool removeCameraViewFromName (const agx::String &name)
 Remove a loaded camera view given an string identifier. Returns false if not found, true if found and deleted. More...
 
bool restoreViewsetFromCFGFile (const agx::String &filename)
 Restores the a view set from a .cfg file. Will overwrite the current view set in the manager. More...
 
void setActiveView (osgViewer::Viewer *viewer)
 Sets the active view in the manager an osgViewer. More...
 
bool setActiveViewFromName (const agx::String &name)
 Set active view in manager from name. Returns false if not found, true if found and deleted. More...
 
void setNextView (osgViewer::Viewer *viewer)
 Toggles the next view in stored views and sets it to an osgViewer. More...
 
void setPreviousView (osgViewer::Viewer *viewer)
 Toggles a previous view in stored views and sets it to an osgViewer. More...
 
void storeCurrentView (osgViewer::Viewer *viewer)
 Stores the current view in osg viewer. More...
 
bool storeViewsetAsCFGFile (const agx::String &filename)
 Store the active configuration to a file. More...
 
- 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 CameraDescription * getCameraDescriptionFromOsgViewer (osgViewer::Viewer *viewer)
 Utility method for converting osgViewer views to CameraViewDescriptions. More...
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Member Functions

virtual ~OsgCameraViewManager ()
 Default destructor. More...
 
bool parseCameraState (agxCFG::ConfigScript *cfg, CameraDescription *c)
 Tries to parse a camera state from the current position in the config script. More...
 
void setViewOnOSGViewer (CameraDescription *c, osgViewer::Viewer *viewer)
 
bool storeCameraState (agxCFG::ConfigScript *cfg, CameraDescription *c)
 Stores the camera description in the in the current place in the configure script. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 

Protected Attributes

CameraDescriptionSetRef m_cameraSet
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

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...
 

Detailed Description

Manager class that acts as a wrapper container for the CameravViewset class for OSG based view systems.

Definition at line 196 of file CameraViewSet.h.

Constructor & Destructor Documentation

◆ OsgCameraViewManager()

agxQt::OsgCameraViewManager::OsgCameraViewManager ( )

Default constructor.

◆ ~OsgCameraViewManager()

virtual agxQt::OsgCameraViewManager::~OsgCameraViewManager ( )
protectedvirtual

Default destructor.

Member Function Documentation

◆ getActiveCameraViewName()

agx::String agxQt::OsgCameraViewManager::getActiveCameraViewName ( ) const

Returns the active view name.

◆ getCameraDescriptionFromOsgViewer()

static CameraDescription* agxQt::OsgCameraViewManager::getCameraDescriptionFromOsgViewer ( osgViewer::Viewer *  viewer)
static

Utility method for converting osgViewer views to CameraViewDescriptions.

◆ getCameraDescriptionSet()

CameraDescriptionSet * agxQt::OsgCameraViewManager::getCameraDescriptionSet ( )

Returns the internal structure of the camera view set.

Definition at line 261 of file CameraViewSet.h.

◆ getCameraViewNames()

agx::Vector<agx::String> agxQt::OsgCameraViewManager::getCameraViewNames ( )

Get the names for all loaded views.

◆ parseCameraState()

bool agxQt::OsgCameraViewManager::parseCameraState ( agxCFG::ConfigScript *  cfg,
CameraDescription *  c 
)
protected

Tries to parse a camera state from the current position in the config script.

◆ removeCameraViewFromName()

bool agxQt::OsgCameraViewManager::removeCameraViewFromName ( const agx::String &  name)

Remove a loaded camera view given an string identifier. Returns false if not found, true if found and deleted.

◆ restoreViewsetFromCFGFile()

bool agxQt::OsgCameraViewManager::restoreViewsetFromCFGFile ( const agx::String &  filename)

Restores the a view set from a .cfg file. Will overwrite the current view set in the manager.

◆ setActiveView()

void agxQt::OsgCameraViewManager::setActiveView ( osgViewer::Viewer *  viewer)

Sets the active view in the manager an osgViewer.

◆ setActiveViewFromName()

bool agxQt::OsgCameraViewManager::setActiveViewFromName ( const agx::String &  name)

Set active view in manager from name. Returns false if not found, true if found and deleted.

◆ setNextView()

void agxQt::OsgCameraViewManager::setNextView ( osgViewer::Viewer *  viewer)

Toggles the next view in stored views and sets it to an osgViewer.

◆ setPreviousView()

void agxQt::OsgCameraViewManager::setPreviousView ( osgViewer::Viewer *  viewer)

Toggles a previous view in stored views and sets it to an osgViewer.

◆ setViewOnOSGViewer()

void agxQt::OsgCameraViewManager::setViewOnOSGViewer ( CameraDescription *  c,
osgViewer::Viewer *  viewer 
)
protected

◆ storeCameraState()

bool agxQt::OsgCameraViewManager::storeCameraState ( agxCFG::ConfigScript *  cfg,
CameraDescription *  c 
)
protected

Stores the camera description in the in the current place in the configure script.

◆ storeCurrentView()

void agxQt::OsgCameraViewManager::storeCurrentView ( osgViewer::Viewer *  viewer)

Stores the current view in osg viewer.

◆ storeViewsetAsCFGFile()

bool agxQt::OsgCameraViewManager::storeViewsetAsCFGFile ( const agx::String &  filename)

Store the active configuration to a file.

Member Data Documentation

◆ m_cameraSet

CameraDescriptionSetRef agxQt::OsgCameraViewManager::m_cameraSet
protected

Definition at line 255 of file CameraViewSet.h.


The documentation for this class was generated from the following file: