Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The specification of an OpenGL GLViewer for a scene. More...
#include <ViewConfig.h>
Public Member Functions | |
ViewConfig () | |
Default constructor. | |
~ViewConfig () | |
Destructor. | |
bool | readXML (const std::string &fileName) |
Parses the XML configuration file. More... | |
void | setDefaults () |
Sets the view configuration to a set of default values. | |
void | setCamera (SceneGraph::GLCamera &camera, size_t i=0) const |
Set the camera properties based on the configuration. More... | |
void | setCameras (std::vector< SceneGraph::GLCamera > &cameras) const |
Sets the vector of cameras based on the camera specifications. More... | |
void | setLight (SceneGraph::GLLight &light, size_t i=0) const |
Set the light properties based on the configuration. More... | |
void | setLights (std::vector< SceneGraph::GLLight > &lights) const |
Sets the vector of lights based on the light specifications. More... | |
Public Attributes | |
std::string | _viewFldr |
The folder the view configuration file is located in. | |
int | _width |
Width of viewport (in pixels). | |
int | _height |
Height of viewport (in pixels). | |
std::string | _bgImg |
The name of the background image to use. | |
Watermark * | _waterMark |
The optional watermark. | |
std::string | _fontName |
Font name. | |
float | _fontColor [4] |
Default font color. | |
std::vector< CameraParam > | _camSpecs |
The set of cameras for the configuration. | |
std::vector< LightParam > | _lightSpecs |
The set of cameras for the configuration. | |
bool Menge::Vis::ViewConfig::readXML | ( | const std::string & | fileName | ) |
Parses the XML configuration file.
fileName | The name of the view configuration file to parse. |
void Menge::Vis::ViewConfig::setCamera | ( | SceneGraph::GLCamera & | camera, |
size_t | i = 0 |
||
) | const |
Set the camera properties based on the configuration.
camera | The camera to set |
i | The index of the camera |
void Menge::Vis::ViewConfig::setCameras | ( | std::vector< SceneGraph::GLCamera > & | cameras | ) | const |
Sets the vector of cameras based on the camera specifications.
cameras | A vector to populate with cameras. Any pre-existing cameras will be deleted. |
void Menge::Vis::ViewConfig::setLight | ( | SceneGraph::GLLight & | light, |
size_t | i = 0 |
||
) | const |
Set the light properties based on the configuration.
light | The light to set |
i | The index of the light specification to apply |
void Menge::Vis::ViewConfig::setLights | ( | std::vector< SceneGraph::GLLight > & | lights | ) | const |
Sets the vector of lights based on the light specifications.
lights | A vector to populate with lights. Any pre-existing lights will be deleted. |