Public Member Functions | Static Public Member Functions | List of all members
graphics::WindowManager Class Reference

#include <gepetto/viewer/window-manager.h>

Public Member Functions

virtual WindowManagerPtr_t clone (void) const
 Proceed to a clonage of the current object defined by the copy constructor. More...
 
WindowManagerPtr_t self (void) const
 Return a shared pointer of the current object. More...
 
virtual bool addNode (NodePtr_t graphical_object_ptr)
 Add a graphical object to the scene. More...
 
virtual GroupNodePtr_t getScene () const
 Return the scene group. More...
 
virtual bool done ()
 Return the current doing of procedure. More...
 
virtual bool frame ()
 Generate a new frame rendering. More...
 
virtual bool run ()
 Run the scene process. More...
 
virtual void setWindowDimension (const unsigned int &width, const unsigned int &height)
 Define dimension of the window. More...
 
virtual void setWindowPosition (const unsigned int &x_position, const unsigned int &y_position)
 Define the window position. More...
 
osgVector2 getWindowPosition () const
 Return the window x and y position as a 2D vector. More...
 
osgVector2 getWindowDimension () const
 Return the window width and height as a 2D vector. More...
 
::osgViewer::ViewerRefPtr getViewerClone ()
 Return a ref to the viewer. More...
 
virtual ~WindowManager ()
 
void captureFrame (const std::string &filename)
 
void startCapture (const std::string &filename, const std::string &extension)
 
void stopCapture ()
 
bool writeNodeFile (const std::string &filename)
 
void setBackgroundColor1 (const osg::Vec4 &color)
 
void setBackgroundColor2 (const osg::Vec4 &color)
 
void getCameraTransform (osg::Vec3d &pos, osg::Quat &rot)
 
void setCameraTransform (const osg::Vec3d &pos, const osg::Quat &rot)
 
void attachCameraToNode (NodePtr_t node)
 
void detachCamera ()
 

Static Public Member Functions

static WindowManagerPtr_t create ()
 Create and initialize a graphical engine of type OSG. More...
 
static WindowManagerPtr_t create (osg::GraphicsContext *gc)
 Create and initialize a graphical engine with a GraphicsContext. More...
 
static WindowManagerPtr_t create (osgViewer::Viewer *v, osg::GraphicsContext *gc)
 
static WindowManagerPtr_t create (const unsigned int &x, const unsigned int &y, const unsigned int &width, const unsigned int &height)
 Create and initialize a graphical engine of type OSG with some parameters : position + dimension. More...
 
static WindowManagerPtr_t createCopy (WindowManagerPtr_t other)
 Static method for creating a clone of box other with the copy constructor. More...
 

Constructor & Destructor Documentation

◆ ~WindowManager()

virtual graphics::WindowManager::~WindowManager ( )
virtual

Member Function Documentation

◆ addNode()

virtual bool graphics::WindowManager::addNode ( NodePtr_t  graphical_object_ptr)
virtual

Add a graphical object to the scene.

◆ attachCameraToNode()

void graphics::WindowManager::attachCameraToNode ( NodePtr_t  node)

◆ captureFrame()

void graphics::WindowManager::captureFrame ( const std::string &  filename)

◆ clone()

virtual WindowManagerPtr_t graphics::WindowManager::clone ( void  ) const
virtual

Proceed to a clonage of the current object defined by the copy constructor.

◆ create() [1/4]

static WindowManagerPtr_t graphics::WindowManager::create ( )
static

Create and initialize a graphical engine of type OSG.

◆ create() [2/4]

static WindowManagerPtr_t graphics::WindowManager::create ( osg::GraphicsContext *  gc)
static

Create and initialize a graphical engine with a GraphicsContext.

◆ create() [3/4]

static WindowManagerPtr_t graphics::WindowManager::create ( osgViewer::Viewer *  v,
osg::GraphicsContext *  gc 
)
static

◆ create() [4/4]

static WindowManagerPtr_t graphics::WindowManager::create ( const unsigned int &  x,
const unsigned int &  y,
const unsigned int &  width,
const unsigned int &  height 
)
static

Create and initialize a graphical engine of type OSG with some parameters : position + dimension.

◆ createCopy()

static WindowManagerPtr_t graphics::WindowManager::createCopy ( WindowManagerPtr_t  other)
static

Static method for creating a clone of box other with the copy constructor.

◆ detachCamera()

void graphics::WindowManager::detachCamera ( )

◆ done()

virtual bool graphics::WindowManager::done ( )
virtual

Return the current doing of procedure.

◆ frame()

virtual bool graphics::WindowManager::frame ( )
virtual

Generate a new frame rendering.

◆ getCameraTransform()

void graphics::WindowManager::getCameraTransform ( osg::Vec3d &  pos,
osg::Quat &  rot 
)

◆ getScene()

virtual GroupNodePtr_t graphics::WindowManager::getScene ( ) const
inlinevirtual

Return the scene group.

◆ getViewerClone()

::osgViewer::ViewerRefPtr graphics::WindowManager::getViewerClone ( )

Return a ref to the viewer.

◆ getWindowDimension()

osgVector2 graphics::WindowManager::getWindowDimension ( ) const

Return the window width and height as a 2D vector.

◆ getWindowPosition()

osgVector2 graphics::WindowManager::getWindowPosition ( ) const

Return the window x and y position as a 2D vector.

◆ run()

virtual bool graphics::WindowManager::run ( )
virtual

Run the scene process.

◆ self()

WindowManagerPtr_t graphics::WindowManager::self ( void  ) const

Return a shared pointer of the current object.

◆ setBackgroundColor1()

void graphics::WindowManager::setBackgroundColor1 ( const osg::Vec4 &  color)
inline

◆ setBackgroundColor2()

void graphics::WindowManager::setBackgroundColor2 ( const osg::Vec4 &  color)
inline

◆ setCameraTransform()

void graphics::WindowManager::setCameraTransform ( const osg::Vec3d &  pos,
const osg::Quat &  rot 
)

◆ setWindowDimension()

virtual void graphics::WindowManager::setWindowDimension ( const unsigned int &  width,
const unsigned int &  height 
)
virtual

Define dimension of the window.

◆ setWindowPosition()

virtual void graphics::WindowManager::setWindowPosition ( const unsigned int &  x_position,
const unsigned int &  y_position 
)
virtual

Define the window position.

◆ startCapture()

void graphics::WindowManager::startCapture ( const std::string &  filename,
const std::string &  extension 
)

◆ stopCapture()

void graphics::WindowManager::stopCapture ( )

◆ writeNodeFile()

bool graphics::WindowManager::writeNodeFile ( const std::string &  filename)