OpenWalnut 1.2.5
|
IO class for writing the graphics engine state to a project file. More...
#include <WGEProjectFileIO.h>
Public Member Functions | |
WGEProjectFileIO () | |
Default constructor. | |
virtual | ~WGEProjectFileIO () |
Destructor. | |
virtual bool | parse (std::string line, unsigned int lineNumber) |
This method parses the specified line and interprets it. | |
virtual void | done () |
Called whenever the end of the project file has been reached. | |
virtual void | save (std::ostream &output) |
Saves the state to the specified stream. | |
Protected Types | |
typedef std::map< unsigned int, std::string > | CameraList |
All Cameras parsed. | |
Protected Attributes | |
CameraList | m_cameras |
Camera map. | |
std::map< unsigned int, osg::Matrixd > | m_manipulatorMatrices |
All view's manipulator matrices. | |
std::map< unsigned int, osg::Vec3d > | m_homeEyeVectors |
The home position eye point. | |
std::map< unsigned int, osg::Vec3d > | m_homeCenterVectors |
The home position center point. | |
std::map< unsigned int, osg::Vec3d > | m_homeUpVectors |
The home position up vector. |
IO class for writing the graphics engine state to a project file.
Currently it only writes the camera settings for the main view with the WGEZoomTrackbalManipulator.
Definition at line 40 of file WGEProjectFileIO.h.
typedef std::map< unsigned int, std::string > WGEProjectFileIO::CameraList [protected] |
All Cameras parsed.
Definition at line 82 of file WGEProjectFileIO.h.
WGEProjectFileIO::WGEProjectFileIO | ( | ) |
Default constructor.
Definition at line 39 of file WGEProjectFileIO.cpp.
WGEProjectFileIO::~WGEProjectFileIO | ( | ) | [virtual] |
Destructor.
Definition at line 45 of file WGEProjectFileIO.cpp.
void WGEProjectFileIO::done | ( | ) | [virtual] |
Called whenever the end of the project file has been reached.
This is useful if your specific parser class wants to do some post processing after parsing line by line.
Reimplemented from WProjectFileIO.
Definition at line 185 of file WGEProjectFileIO.cpp.
References WGraphicsEngine::getGraphicsEngine(), m_cameras, m_homeCenterVectors, m_homeEyeVectors, m_homeUpVectors, m_manipulatorMatrices, and wlog::warn().
bool WGEProjectFileIO::parse | ( | std::string | line, |
unsigned int | lineNumber | ||
) | [virtual] |
This method parses the specified line and interprets it.
It gets called line by line by WProjectFile.
line | the current line as string |
lineNumber | the current line number. Useful for error/warning/debugging output. |
Implements WProjectFileIO.
Definition at line 103 of file WGEProjectFileIO.cpp.
References wlog::debug(), m_cameras, m_homeCenterVectors, m_homeEyeVectors, m_homeUpVectors, and m_manipulatorMatrices.
void WGEProjectFileIO::save | ( | std::ostream & | output | ) | [virtual] |
Saves the state to the specified stream.
output | the stream to print the state to. |
Implements WProjectFileIO.
Definition at line 228 of file WGEProjectFileIO.cpp.
References WGraphicsEngine::getGraphicsEngine().
CameraList WGEProjectFileIO::m_cameras [protected] |
std::map< unsigned int, osg::Vec3d > WGEProjectFileIO::m_homeCenterVectors [protected] |
The home position center point.
Definition at line 102 of file WGEProjectFileIO.h.
std::map< unsigned int, osg::Vec3d > WGEProjectFileIO::m_homeEyeVectors [protected] |
The home position eye point.
Definition at line 97 of file WGEProjectFileIO.h.
std::map< unsigned int, osg::Vec3d > WGEProjectFileIO::m_homeUpVectors [protected] |
The home position up vector.
Definition at line 107 of file WGEProjectFileIO.h.
std::map< unsigned int, osg::Matrixd > WGEProjectFileIO::m_manipulatorMatrices [protected] |
All view's manipulator matrices.
Definition at line 92 of file WGEProjectFileIO.h.