WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. API
  4. Cubios::Gfx::SpriteAtlas
Mission NodeSDK 6.3C++gfx engine

Cubios::Gfx::SpriteAtlas

Cubios::Gfx::SpriteAtlas Constructors SpriteAtlas Summary Constructs an object for storing multiple images in a set (an atlas) Arguments filename name of an ...

API / SDK 6.3 / C++ / gfx engine

Cubios::Gfx::SpriteAtlas

Constructors

SpriteAtlas

Summary

Constructs an object for storing multiple images in a set (an atlas)

Arguments

  • filename - name of an image file that holds a set of images to be added to the atlas
  • scene - pointer to current Scene object

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1SpriteAtlas<T>::SpriteAtlas(std::string filename, Cubios::Scene* scene)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Comments

When creating a class, you must specify a template parameter - a class that is or is inherited from SpriteBaseElement

Public Methods

AddSprite

Summary

Adds a new sprite with the given ID to the atlas

Arguments

  • id - new sprite identifier
  • rc - rectangular area on the source texture that will be cut out and added as a sprite

Output

Returns true if function call succeeds, otherwise false.

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1bool AddSprite(uint32_t id, const Cubios::Math::Rect2& rc)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

RemoveSprite

Summary

Removes a sprite with the given ID from the atlas

Arguments

  • id - sprite identifier

Output

Returns true if function call succeeds, otherwise false.

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1bool RemoveSprite(uint32_t id)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Get

Summary

Gets a pointer to a sprite atlas element with the given ID

Arguments

  • id - sprite identifier

Output

A pointer to an instance of the class provided with the template argument during construction.

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1T* Get(uint32_t ind)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Count

Summary

Returns the number of sprite elements in the atlas

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1size_t Count()
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

ElementsInsertionOrder

Summary

Allows to retrive a list of sprite identifiers in the order of their addition to the atlas

Output

A pointer to a vector with sprite identifiers.

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1std::vector<uint32_t>* ElementsInsertionOrder()
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Public Operators

operator []

Summary

Gets a pointer to a sprite atlas element with the given ID

Arguments

  • id - sprite identifier

Output

A pointer to an instance of the class provided with the template argument during construction.

Synopsis

Cubios::Gfx::SpriteAtlas
CPP
1T* operator[](uint32_t)
2
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.

Jump Grid

On This Page

ConstructorsSpriteAtlasPublic MethodsAddSpriteRemoveSpriteGetCountElementsInsertionOrderPublic Operatorsoperator []
Context Rail

Related nodes

Cubios::Math
API / SDK 6.3 / C++ / gfx engine
Cubios::Math::Vec2
API / SDK 6.3 / C++ / gfx engine
Cubios::Math::Transform
API / SDK 6.3 / C++ / gfx engine
Cubios::Math::Color
API / SDK 6.3 / C++ / gfx engine
Previous Node
Cubios::Gfx::Sprite
API / SDK 6.3 / C++ / gfx engine
Next Node
Cubios::Gfx::SpriteAtlasElement
API / SDK 6.3 / C++ / gfx engine