Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
Menge::Vis::ViewConfig Class Reference

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.
 

Detailed Description

The specification of an OpenGL GLViewer for a scene.

See also
GLViewer

Member Function Documentation

bool Menge::Vis::ViewConfig::readXML ( const std::string &  fileName)

Parses the XML configuration file.

Parameters
fileNameThe name of the view configuration file to parse.
Returns
A boolean reporting success (true) or failure (false).
void Menge::Vis::ViewConfig::setCamera ( SceneGraph::GLCamera camera,
size_t  i = 0 
) const

Set the camera properties based on the configuration.

Parameters
cameraThe camera to set
iThe 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.

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

Parameters
lightThe light to set
iThe 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.

Parameters
lightsA vector to populate with lights. Any pre-existing lights will be deleted.

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