You.i Engine
SpriteSheet Class Reference

Detailed Description

A sprite sheet class is used to store a tile map of sprite frames. Each tile is of equal size.

#include <renderer/YiSpriteSheet.h>

Public Member Functions

 SpriteSheet (const std::shared_ptr< CYIAssetTexture > &pTextureAsset, float fSubimageWidth, float fSubimageHeight)
 
 ~SpriteSheet ()
 
void DisplayFrame (int32_t nIndex)
 
const std::shared_ptr< CYIMesh > & GetMesh () const
 
const std::shared_ptr< CYIMaterialGetMaterial () const
 

Constructor & Destructor Documentation

SpriteSheet::SpriteSheet ( const std::shared_ptr< CYIAssetTexture > &  pTextureAsset,
float  fSubimageWidth,
float  fSubimageHeight 
)

A texture asset, and the tile width and height are also provided.

SpriteSheet::~SpriteSheet ( )

Member Function Documentation

void SpriteSheet::DisplayFrame ( int32_t  nIndex)

Updates the sprite sheet to display a given frame.

const std::shared_ptr<CYIMaterial> SpriteSheet::GetMaterial ( ) const
const std::shared_ptr<CYIMesh>& SpriteSheet::GetMesh ( ) const

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