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 subimageWidth, float subimageHeight)
 ~SpriteSheet ()
void DisplayFrame (size_t index)
const std::shared_ptr< CYIMesh > & GetMesh () const
const std::shared_ptr< CYIMaterialGetMaterial () const

Constructor & Destructor Documentation

◆ SpriteSheet()

SpriteSheet::SpriteSheet ( const std::shared_ptr< CYIAssetTexture > &  pTextureAsset,
float  subimageWidth,
float  subimageHeight 

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

◆ ~SpriteSheet()

SpriteSheet::~SpriteSheet ( )

Member Function Documentation

◆ DisplayFrame()

void SpriteSheet::DisplayFrame ( size_t  index)

Updates the sprite sheet to display a given frame.

◆ GetMaterial()

const std::shared_ptr<CYIMaterial> SpriteSheet::GetMaterial ( ) const

◆ GetMesh()

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

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