osgUtil::Optimizer::TextureAtlasBuilder Class Reference

`#include <Optimizer>`

## Classes

class | Source
class | Atlas

## Public Member Functions

| TextureAtlasBuilder ()
void | reset ()
void | setMaximumAtlasSize (int width, int height)
int | getMaximumAtlasWidth () const
int | getMaximumAtlasHeight () const
void | setMargin (int margin)
int | getMargin () const
void | addSource (const osg::Image *image)
void | addSource (const osg::Texture2D *texture)
unsigned int | getNumSources () const
const osg::Image * | getSourceImage (unsigned int i)
const osg::Texture2D * | getSourceTexture (unsigned int i)
void | buildAtlas ()
osg::Image * | getImageAtlas (unsigned int i)
osg::Texture2D * | getTextureAtlas (unsigned int i)
osg::Matrix | getTextureMatrix (unsigned int i)
osg::Image * | getImageAtlas (const osg::Image *image)
osg::Texture2D * | getTextureAtlas (const osg::Image *image)
osg::Matrix | getTextureMatrix (const osg::Image *image)
osg::Image * | getImageAtlas (const osg::Texture2D *textue)
osg::Texture2D * | getTextureAtlas (const osg::Texture2D *texture)
osg::Matrix | getTextureMatrix (const osg::Texture2D *texture)

## Protected Types

typedef std::vector< osg::ref_ptr< Source > > | SourceList
typedef std::vector< osg::ref_ptr< Atlas > > | AtlasList

## Protected Member Functions

Source * | getSource (const osg::Image *image)
Source * | getSource (const osg::Texture2D *texture)

## Protected Attributes

int | _maximumAtlasWidth
int | _maximumAtlasHeight
int | _margin
SourceList | _sourceList
AtlasList | _atlasList

## Detailed Description

Texture Atlas Builder creates a set of textures/images which each contain multiple images. Texture Atlas' are used to make it possible to use much wider batching of data.

## Member Typedef Documentation

## AtlasList

typedef std::vector< osg::ref_ptr<Atlas> > osgUtil::Optimizer::TextureAtlasBuilder::AtlasList

protected

## SourceList

typedef std::vector< osg::ref_ptr<Source> > osgUtil::Optimizer::TextureAtlasBuilder::SourceList

protected

## Constructor & Destructor Documentation

## TextureAtlasBuilder()

osgUtil::Optimizer::TextureAtlasBuilder::TextureAtlasBuilder | ( |  | ) |

## Member Function Documentation

## addSource() [1/2]

void osgUtil::Optimizer::TextureAtlasBuilder::addSource | ( | const osg::Image * | image | ) |

## addSource() [2/2]

void osgUtil::Optimizer::TextureAtlasBuilder::addSource | ( | const osg::Texture2D * | texture | ) |

## buildAtlas()

void osgUtil::Optimizer::TextureAtlasBuilder::buildAtlas | ( |  | ) |

## getImageAtlas() [1/3]

osg::Image * osgUtil::Optimizer::TextureAtlasBuilder::getImageAtlas | ( | const osg::Image * | image | ) |

## getImageAtlas() [2/3]

osg::Image * osgUtil::Optimizer::TextureAtlasBuilder::getImageAtlas | ( | const osg::Texture2D * | textue | ) |

## getImageAtlas() [3/3]

osg::Image * osgUtil::Optimizer::TextureAtlasBuilder::getImageAtlas | ( | unsigned int | i | ) |

## getMargin()

int osgUtil::Optimizer::TextureAtlasBuilder::getMargin | ( |  | ) | const

inline

References _margin.

## getMaximumAtlasHeight()

int osgUtil::Optimizer::TextureAtlasBuilder::getMaximumAtlasHeight | ( |  | ) | const

inline

References _maximumAtlasHeight.

## getMaximumAtlasWidth()

int osgUtil::Optimizer::TextureAtlasBuilder::getMaximumAtlasWidth | ( |  | ) | const

inline

References _maximumAtlasWidth.

## getNumSources()

unsigned int osgUtil::Optimizer::TextureAtlasBuilder::getNumSources | ( |  | ) | const

inline

References _sourceList.

## getSource() [1/2]

Source * osgUtil::Optimizer::TextureAtlasBuilder::getSource | ( | const osg::Image * | image | ) |

protected

## getSource() [2/2]

Source * osgUtil::Optimizer::TextureAtlasBuilder::getSource | ( | const osg::Texture2D * | texture | ) |

protected

## getSourceImage()

const osg::Image * osgUtil::Optimizer::TextureAtlasBuilder::getSourceImage | ( | unsigned int | i | ) |

inline

References _sourceList.

## getSourceTexture()

const osg::Texture2D * osgUtil::Optimizer::TextureAtlasBuilder::getSourceTexture | ( | unsigned int | i | ) |

inline

References _sourceList.

## getTextureAtlas() [1/3]

osg::Texture2D * osgUtil::Optimizer::TextureAtlasBuilder::getTextureAtlas | ( | const osg::Image * | image | ) |

## getTextureAtlas() [2/3]

osg::Texture2D * osgUtil::Optimizer::TextureAtlasBuilder::getTextureAtlas | ( | const osg::Texture2D * | texture | ) |

## getTextureAtlas() [3/3]

osg::Texture2D * osgUtil::Optimizer::TextureAtlasBuilder::getTextureAtlas | ( | unsigned int | i | ) |

## getTextureMatrix() [1/3]

osg::Matrix osgUtil::Optimizer::TextureAtlasBuilder::getTextureMatrix | ( | const osg::Image * | image | ) |

## getTextureMatrix() [2/3]

osg::Matrix osgUtil::Optimizer::TextureAtlasBuilder::getTextureMatrix | ( | const osg::Texture2D * | texture | ) |

## getTextureMatrix() [3/3]

osg::Matrix osgUtil::Optimizer::TextureAtlasBuilder::getTextureMatrix | ( | unsigned int | i | ) |

## reset()

void osgUtil::Optimizer::TextureAtlasBuilder::reset | ( |  | ) |

## setMargin()

void osgUtil::Optimizer::TextureAtlasBuilder::setMargin | ( | int | margin | ) |

## setMaximumAtlasSize()

void osgUtil::Optimizer::TextureAtlasBuilder::setMaximumAtlasSize | ( | int | width,
|  | int | height )

## Member Data Documentation

## _atlasList

AtlasList osgUtil::Optimizer::TextureAtlasBuilder::_atlasList

protected

## _margin

int osgUtil::Optimizer::TextureAtlasBuilder::_margin

protected

Referenced by getMargin().

## _maximumAtlasHeight

int osgUtil::Optimizer::TextureAtlasBuilder::_maximumAtlasHeight

protected

Referenced by getMaximumAtlasHeight().

## _maximumAtlasWidth

int osgUtil::Optimizer::TextureAtlasBuilder::_maximumAtlasWidth

protected

Referenced by getMaximumAtlasWidth().

## _sourceList

SourceList osgUtil::Optimizer::TextureAtlasBuilder::_sourceList

protected

Referenced by getNumSources(), getSourceImage(), and getSourceTexture().

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

- Optimizer