R-Type
Public Member Functions | List of all members
GameEngine::ISprite< T, TextuT, rectT > Class Template Referenceabstract

Interface for sprite. More...

#include <RenderInterfaces.hpp>

Public Member Functions

 ~ISprite ()=default
 Destructor. More...
 
virtual const T & getSprite () const =0
 Get the sprite stored. More...
 
virtual void load (const ITexture< TextuT, rectT > &texture, bool resetRect=false)=0
 load the sprite More...
 
virtual void setPosition (const Vector2< float > position)=0
 set the position of the sprite More...
 
virtual void setTextureRect (const IRect< int, rectT > &newRect)=0
 set a new rect forof the sprite More...
 

Detailed Description

template<class T, class TextuT, template< typename > class rectT>
class GameEngine::ISprite< T, TextuT, rectT >

Interface for sprite.

Template Parameters
Ttemplate type of sprite
TextuTtype of texture
rectTtype of rect

Constructor & Destructor Documentation

◆ ~ISprite()

template<class T , class TextuT , template< typename > class rectT>
GameEngine::ISprite< T, TextuT, rectT >::~ISprite ( )
default

Destructor.

Member Function Documentation

◆ getSprite()

template<class T , class TextuT , template< typename > class rectT>
virtual const T& GameEngine::ISprite< T, TextuT, rectT >::getSprite ( ) const
pure virtual

Get the sprite stored.

Returns
return the sprite

Implemented in GameEngine::Sprite.

◆ load()

template<class T , class TextuT , template< typename > class rectT>
virtual void GameEngine::ISprite< T, TextuT, rectT >::load ( const ITexture< TextuT, rectT > &  texture,
bool  resetRect = false 
)
pure virtual

load the sprite

Parameters
texturetexture from which to load the sprite
resetRectboolean to reset the sprite rectangle

Implemented in GameEngine::Sprite.

◆ setPosition()

template<class T , class TextuT , template< typename > class rectT>
virtual void GameEngine::ISprite< T, TextuT, rectT >::setPosition ( const Vector2< float >  position)
pure virtual

set the position of the sprite

Parameters
positionnew position of the sprite

Implemented in GameEngine::Sprite.

◆ setTextureRect()

template<class T , class TextuT , template< typename > class rectT>
virtual void GameEngine::ISprite< T, TextuT, rectT >::setTextureRect ( const IRect< int, rectT > &  newRect)
pure virtual

set a new rect forof the sprite

Parameters
newRectnew rect of the sprite

Implemented in GameEngine::Sprite.


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