This is a collection of smaller textures packed into a larger texture, intended to increase UI performance. More...
#include <textureatlas.h>
Collaboration diagram for Mezzanine::UI::TextureAtlas:Public Types | |
| typedef FontDataContainer::const_iterator | ConstFontDataIterator |
| Const Iterator type for fonts stored in this class. | |
| typedef SpriteContainer::const_iterator | ConstSpriteIterator |
| Const Iterator type for images stored in this class. | |
| typedef std::map< String, FontData * > | FontDataContainer |
| Container type for storing fonts packed into this atlas. | |
| typedef FontDataContainer::iterator | FontDataIterator |
| Iterator type for fonts stored in this class. | |
| typedef std::map< String, Sprite * > | SpriteContainer |
| Container type for storing images packed into this atlas. | |
| typedef SpriteContainer::iterator | SpriteIterator |
| Iterator type for images stored in this class. | |
Public Member Functions | |
| TextureAtlas (const String &Name, const UInt32 &Width, const UInt32 &Height) | |
| Proceadural constructor. More... | |
| TextureAtlas (XML::Node &AtlasNode) | |
| XML constructor. More... | |
| ~TextureAtlas () | |
| Class destructor. | |
| Ogre::Pass * | _Get2DPass () const |
| Gets the 2D Material Pass for this TextureAtlas. More... | |
| Ogre::Pass * | _Get3DPass () const |
| Gets the 3D Material Pass for this TextureAtlas. More... | |
| Ogre::MaterialPtr | _GetOrCreate2DMaterial () |
| Gets the 2D Material for this TextureAtlas, creating it also if neccessary. More... | |
| Ogre::MaterialPtr | _GetOrCreate3DMaterial () |
| Gets the 3D Material for this TextureAtlas, creating it also if neccessary. More... | |
| Ogre::TexturePtr | _GetTexture () |
| Gets the texture being used by this Atlas. More... | |
| FontData * | GetFont (const String &FontName) const |
| Gets the set of Glyphs of the specified name. More... | |
| FontDataContainer & | GetFonts () |
| Gets the full listing of all the FontData instances in this TextureAtlas. More... | |
| Real | GetInvTextureCoordsX () const |
| Gets the inverse size of the TextureAtlas on the X size. More... | |
| Real | GetInvTextureCoordsY () const |
| Gets the inverse size of the TextureAtlas on the Y size. More... | |
| const String & | GetName () const |
| Gets the name of this Texture Atlas. More... | |
| Sprite * | GetSprite (const String &SpriteName) const |
| Gets a Sprite by name. More... | |
| SpriteContainer & | GetSprites () |
| Gets the full listing of all the Sprite's in this TextureAtlas. More... | |
| Vector2 | GetTextureSize () const |
| Gets the size of the TextureAtlas. More... | |
| Vector2 | GetWhitePixel () const |
| Gets the location of the WhitePixel on the TextureAtlas. More... | |
| Real | GetWhitePixelX () const |
| Gets the X coordinate for the WhitePixel. More... | |
| Real | GetWhitePixelY () const |
| Gets the Y coordinate for the WhitePixel. More... | |
Protected Member Functions | |
| void | Create2DMaterial () |
| Creates the material to be used by 2D interfaces with this Atlas. | |
| void | Create3DMaterial () |
| Creates the material to be used by 3D interfaces with this Atlas. | |
| Ogre::MaterialPtr | GetOrCreate2DMasterMaterial () |
| Gets or creates the 2D "template" or "master" material that is to be used to copy from for all Atlases. | |
| Ogre::MaterialPtr | GetOrCreate3DMasterMaterial () |
| Gets or creates the 3D "template" or "master" material that is to be used to copy from for all Atlases. | |
| void | ParseFonts (XML::Node &AtlasFontsNode) |
| Parses the data for a font. | |
| void | ParseGlyphs (XML::Node &GlyphsNode, const Vector2 &Offset, FontData *GlyphD) |
| Parses the glyphs section of the Texture Atlas. | |
| void | ParseKernings (XML::Node &KerningsNode, FontData *FontD) |
| Parses the kerning section of the Texture Atlas. | |
| void | ParseSprites (XML::Node &AtlasSpritesNode) |
| Parses the sprites section of the Texture Atlas. | |
| void | ParseTexture (XML::Node &AtlasTextureNode) |
| Parses the texture section of the Texture Atlas. | |
| void | ParseVerticalOffsets (XML::Node &VerticalOffsetsNode, FontData *FontD) |
| Parses the vertical offsets section of the Texture Atlas. | |
Protected Attributes | |
| String | AtlasName |
| The name of this atlas. More... | |
| FontDataContainer | Fonts |
| A container of the fonts packed into this atlas. More... | |
| Vector2 | InverseTextureSize |
| This is (Size / 1) on the X and Y. Useful for doing math. More... | |
| SpriteContainer | Sprites |
| A container of the images packed into this atlas. More... | |
| TextureAtlasInternalData * | TAID |
| A pointer to internal rendering data that cannot be exposed here. More... | |
| Vector2 | WhitePixel |
| A known position on the atlas where the pixel is flat white. Surrounding pixels should also be white. More... | |
This is a collection of smaller textures packed into a larger texture, intended to increase UI performance.
Definition at line 71 of file textureatlas.h.
| Mezzanine::UI::TextureAtlas::TextureAtlas | ( | const String & | Name, |
| const UInt32 & | Width, | ||
| const UInt32 & | Height | ||
| ) |
Proceadural constructor.
| Name | The name to be given to this Texture Atlas. |
| Width | The width of the desired texture to create for this atlas. |
| Height | The height of the desired texture to create for this atlas. |
Definition at line 103 of file textureatlas.cpp.
| Mezzanine::UI::TextureAtlas::TextureAtlas | ( | XML::Node & | AtlasNode | ) |
XML constructor.
| AtlasNode | The XML node containing all the information to create and configure this texture atlas. |
Definition at line 114 of file textureatlas.cpp.
| Ogre::Pass * Mezzanine::UI::TextureAtlas::_Get2DPass | ( | ) | const |
Gets the 2D Material Pass for this TextureAtlas.
Definition at line 614 of file textureatlas.cpp.
| Ogre::Pass * Mezzanine::UI::TextureAtlas::_Get3DPass | ( | ) | const |
Gets the 3D Material Pass for this TextureAtlas.
Definition at line 617 of file textureatlas.cpp.
| Ogre::MaterialPtr Mezzanine::UI::TextureAtlas::_GetOrCreate2DMaterial | ( | ) |
Gets the 2D Material for this TextureAtlas, creating it also if neccessary.
Definition at line 595 of file textureatlas.cpp.
| Ogre::MaterialPtr Mezzanine::UI::TextureAtlas::_GetOrCreate3DMaterial | ( | ) |
Gets the 3D Material for this TextureAtlas, creating it also if neccessary.
Definition at line 603 of file textureatlas.cpp.
| Ogre::TexturePtr Mezzanine::UI::TextureAtlas::_GetTexture | ( | ) |
Gets the texture being used by this Atlas.
Definition at line 611 of file textureatlas.cpp.
Gets the set of Glyphs of the specified name.
| FontName | The name of the font as specified in the MTA file. |
Definition at line 550 of file textureatlas.cpp.
| TextureAtlas::FontDataContainer & Mezzanine::UI::TextureAtlas::GetFonts | ( | ) |
Gets the full listing of all the FontData instances in this TextureAtlas.
Definition at line 558 of file textureatlas.cpp.
| Real Mezzanine::UI::TextureAtlas::GetInvTextureCoordsX | ( | ) | const |
Gets the inverse size of the TextureAtlas on the X size.
Definition at line 586 of file textureatlas.cpp.
| Real Mezzanine::UI::TextureAtlas::GetInvTextureCoordsY | ( | ) | const |
Gets the inverse size of the TextureAtlas on the Y size.
Definition at line 589 of file textureatlas.cpp.
| const String & Mezzanine::UI::TextureAtlas::GetName | ( | ) | const |
Gets the name of this Texture Atlas.
Definition at line 542 of file textureatlas.cpp.
Gets a Sprite by name.
| SpriteName | The name of the Sprite to get. |
Definition at line 563 of file textureatlas.cpp.
| TextureAtlas::SpriteContainer & Mezzanine::UI::TextureAtlas::GetSprites | ( | ) |
Gets the full listing of all the Sprite's in this TextureAtlas.
Definition at line 571 of file textureatlas.cpp.
| Vector2 Mezzanine::UI::TextureAtlas::GetTextureSize | ( | ) | const |
Gets the size of the TextureAtlas.
Definition at line 583 of file textureatlas.cpp.
| Vector2 Mezzanine::UI::TextureAtlas::GetWhitePixel | ( | ) | const |
Gets the location of the WhitePixel on the TextureAtlas.
Definition at line 574 of file textureatlas.cpp.
| Real Mezzanine::UI::TextureAtlas::GetWhitePixelX | ( | ) | const |
Gets the X coordinate for the WhitePixel.
Definition at line 577 of file textureatlas.cpp.
| Real Mezzanine::UI::TextureAtlas::GetWhitePixelY | ( | ) | const |
Gets the Y coordinate for the WhitePixel.
Definition at line 580 of file textureatlas.cpp.
|
protected |
The name of this atlas.
Definition at line 98 of file textureatlas.h.
|
protected |
A container of the fonts packed into this atlas.
Definition at line 92 of file textureatlas.h.
|
protected |
This is (Size / 1) on the X and Y. Useful for doing math.
Definition at line 104 of file textureatlas.h.
|
protected |
A container of the images packed into this atlas.
Definition at line 95 of file textureatlas.h.
|
protected |
A pointer to internal rendering data that cannot be exposed here.
Definition at line 89 of file textureatlas.h.
|
protected |
A known position on the atlas where the pixel is flat white. Surrounding pixels should also be white.
Definition at line 101 of file textureatlas.h.
1.8.9.1. Thanks to the
Open Icon Library
for help with some of the icons.