version 3.3

VRS::CubeMapCreator Class Reference

Singleton class for creating static cube maps. More...

#include <vrs/io/cubemapcreator.h>

Inheritance diagram for VRS::CubeMapCreator:

VRS::SharedObj

List of all members.

Static Public Member Functions

static SO< Iterator< SO< Image > > > createCubeMapImagesFromScene (SO< SceneThing > scene, VRS::Vector from, unsigned int size=512, SO< VRS::GLCanvas > canvas=NULL)
static SO< Iterator< SO< Image > > > loadCubeMapImages (std::string baseName)
static void writeCubeMapImages (SO< Iterator< SO< Image > > > images, std::string baseName)
static void createAndWriteCubeMapImages (SO< SceneThing > scene, VRS::Vector from, std::string baseName="cubemap", int size=512, SO< VRS::GLCanvas > canvas=NULL)


Detailed Description

Singleton class for creating static cube maps.

Member Function Documentation

static SO<Iterator<SO<Image> > > VRS::CubeMapCreator::createCubeMapImagesFromScene ( SO< SceneThing scene,
VRS::Vector  from,
unsigned int  size = 512,
SO< VRS::GLCanvas canvas = NULL 
) [static]

Creates a cube map from the given scene. The 'cube'-camera is positioned at from and shoots along the axes. With size you can determine the width and height of a single image. The method returns an iterator over 6 images that are ordered corresponding to the 'Side' enum in 'CubeMapTextureGL'. If scene contains a camera, this one is disabled during the creation of the cube map. Note: do not use 'BackgroundGL' with in the scene. Otherwise the cube map will be discontinuous.

static SO<Iterator<SO<Image> > > VRS::CubeMapCreator::loadCubeMapImages ( std::string  baseName  )  [static]

Loads a prerendered cube map from disk and returns an iterator over 6 images ordered ike above. To specify the location set of the separate png files specify baseName. Leaf the last underscore and any side name (_top, _bottom, etc).

static void VRS::CubeMapCreator::writeCubeMapImages ( SO< Iterator< SO< Image > > >  images,
std::string  baseName 
) [static]

Writes a given cube map to disk. The single images (one per side) must be ordered like mentioned above. Note: there is no validation wheter the given images have the same size nor fit together anyway. The given basename is extended for each side by _top.png, _bottom.png, etc.

static void VRS::CubeMapCreator::createAndWriteCubeMapImages ( SO< SceneThing scene,
VRS::Vector  from,
std::string  baseName = "cubemap",
int  size = 512,
SO< VRS::GLCanvas canvas = NULL 
) [static]

Subsumes 'createCubeMapImagesFromScene' and 'writeCubeMapImages'.


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

Generated on Mon May 21 06:00:18 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact