Tramway SDK
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
tram::Render::Sprite Class Reference

#include <sprite.h>

Inheritance diagram for tram::Render::Sprite:
tram::Resource

Public Member Functions

 Sprite (UID name)
 
MaterialGetMaterial () const
 
void SetMaterial (Material *mat)
 
void LoadFromDisk ()
 
void LoadFromMemory ()
 
void Unload ()
 
const std::vector< SpriteFrame > & GetFrames ()
 
- Public Member Functions inherited from tram::Resource
 Resource (name_t name)
 
Resource::Status GetStatus () const
 
name_t GetName () const
 
size_t GetReferences () const
 
bool IsLoadFailed () const
 
void AddReference ()
 
void RemoveReference ()
 
void Load ()
 

Static Public Member Functions

static SpriteFind (name_t name)
 

Protected Attributes

std::vector< SpriteFrameframes
 
Materialmaterial = nullptr
 
- Protected Attributes inherited from tram::Resource
Status status = UNLOADED
 
name_t name
 
bool load_fail = false
 
size_t references = 0
 

Additional Inherited Members

- Public Types inherited from tram::Resource
enum  Status { UNLOADED , LOADED , READY }
 

Constructor & Destructor Documentation

◆ Sprite()

tram::Render::Sprite::Sprite ( UID  name)
inline

Member Function Documentation

◆ Find()

Sprite * Sprite::Find ( name_t  name)
static

◆ GetFrames()

const std::vector< SpriteFrame > & tram::Render::Sprite::GetFrames ( )
inline

◆ GetMaterial()

Material * tram::Render::Sprite::GetMaterial ( ) const
inline

◆ LoadFromDisk()

void Sprite::LoadFromDisk ( )
virtual

Implements tram::Resource.

◆ LoadFromMemory()

void Sprite::LoadFromMemory ( )
virtual

Implements tram::Resource.

◆ SetMaterial()

void tram::Render::Sprite::SetMaterial ( Material mat)
inline

◆ Unload()

void tram::Render::Sprite::Unload ( )
inlinevirtual

Implements tram::Resource.

Member Data Documentation

◆ frames

std::vector<SpriteFrame> tram::Render::Sprite::frames
protected

◆ material

Material* tram::Render::Sprite::material = nullptr
protected

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