version 3.3

VRS::TextureAtlasCreator Class Reference

This class can be used to create texture atlases for a set of images. More...

#include <vrs/image/textureatlascreator.h>

Inheritance diagram for VRS::TextureAtlasCreator:

VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 TextureAtlasCreator (SO< Iterator< SO< Image > > > images, unsigned int maxAtlasSizeX=1024, unsigned int maxAtlasSizeY=1024)
 Create a set of texture atlases for the given set of original images.
virtual unsigned int atlases () const
virtual SO< ImageatlasImage (unsigned int atlas) const
virtual double atlasUsage (unsigned int atlas) const
virtual unsigned int atlasSubImages (unsigned int atlas) const
virtual bool containsImage (SO< Image > origImage) const
virtual unsigned int atlasIndex (SO< Image > origImage) const
virtual SO< ImageatlasImage (SO< Image > origImage) const
virtual SO< ImageatlasSubImage (SO< Image > origImage) const
virtual Area atlasArea (SO< Image > origImage) const
virtual Matrix texCoordTransform (SO< Image > origImage) const
virtual Matrix texCoordTransform (unsigned int atlas, unsigned int subImage) const
virtual SO< Iterator< unsigned
int > > 
getOriginalImageIndices (unsigned int atlas) const
 This method returns for a given atlas image index the indices of the original images that have been combined in the atlas.

Static Public Member Functions

static SO< Iterator< Area > > createSubImagePlacement (SO< Iterator< std::pair< unsigned int, unsigned int > > > imageSizes, unsigned int maxAtlasSizeX=1024, unsigned int maxAtlasSizeY=1024)
 This method tries to generate a distribution suitable for a texture atlas.


Detailed Description

This class can be used to create texture atlases for a set of images.

Constructor & Destructor Documentation

VRS::TextureAtlasCreator::TextureAtlasCreator ( SO< Iterator< SO< Image > > >  images,
unsigned int  maxAtlasSizeX = 1024,
unsigned int  maxAtlasSizeY = 1024 
)

Create a set of texture atlases for the given set of original images.

Each atlas image is at most maxAtlasSizeX times maxAtlasSizeY pixels large.


Member Function Documentation

static SO<Iterator<Area> > VRS::TextureAtlasCreator::createSubImagePlacement ( SO< Iterator< std::pair< unsigned int, unsigned int > > >  imageSizes,
unsigned int  maxAtlasSizeX = 1024,
unsigned int  maxAtlasSizeY = 1024 
) [static]

This method tries to generate a distribution suitable for a texture atlas.

The images are specified by their dimensions only: (sizeX, sizeY) provided as pairs. If the given set of images do not fit into the texture atlas with the given size, NULL is returned; otherwise, an iterator is returned with the placement parameters for each input image stored as an VRS::Area object.

virtual unsigned int VRS::TextureAtlasCreator::atlases (  )  const [virtual]

virtual SO<Image> VRS::TextureAtlasCreator::atlasImage ( unsigned int  atlas  )  const [virtual]

virtual double VRS::TextureAtlasCreator::atlasUsage ( unsigned int  atlas  )  const [virtual]

virtual unsigned int VRS::TextureAtlasCreator::atlasSubImages ( unsigned int  atlas  )  const [virtual]

virtual bool VRS::TextureAtlasCreator::containsImage ( SO< Image origImage  )  const [virtual]

virtual unsigned int VRS::TextureAtlasCreator::atlasIndex ( SO< Image origImage  )  const [virtual]

virtual SO<Image> VRS::TextureAtlasCreator::atlasImage ( SO< Image origImage  )  const [virtual]

virtual SO<Image> VRS::TextureAtlasCreator::atlasSubImage ( SO< Image origImage  )  const [virtual]

virtual Area VRS::TextureAtlasCreator::atlasArea ( SO< Image origImage  )  const [virtual]

virtual Matrix VRS::TextureAtlasCreator::texCoordTransform ( SO< Image origImage  )  const [virtual]

virtual Matrix VRS::TextureAtlasCreator::texCoordTransform ( unsigned int  atlas,
unsigned int  subImage 
) const [virtual]

virtual SO<Iterator<unsigned int> > VRS::TextureAtlasCreator::getOriginalImageIndices ( unsigned int  atlas  )  const [virtual]

This method returns for a given atlas image index the indices of the original images that have been combined in the atlas.

For instance, getOriginalImageIndices(0) returns the positions within the 'images' iterator (passed in the constructor) that point to the images that have been combined in atlas 0.


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

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