| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/image/textureatlascreator.h>

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< Image > | atlasImage (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< Image > | atlasImage (SO< Image > origImage) const |
| virtual SO< Image > | atlasSubImage (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. | |
| 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.
| 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 double VRS::TextureAtlasCreator::atlasUsage | ( | unsigned int | atlas | ) | const [virtual] |
| virtual unsigned int VRS::TextureAtlasCreator::atlasSubImages | ( | unsigned int | atlas | ) | 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.