Irrlicht 3D Engine
irr::gui::IGUISpriteBank Class Referenceabstract

Sprite bank interface. More...

#include <IGUISpriteBank.h>

+ Inheritance diagram for irr::gui::IGUISpriteBank:

Public Member Functions

virtual void addTexture (video::ITexture *texture)=0
 Adds a texture to the sprite bank. More...
 
virtual s32 addTextureAsSprite (video::ITexture *texture)=0
 
virtual void clear ()=0
 clears sprites, rectangles and textures More...
 
virtual void draw2DSprite (u32 index, const core::position2di &pos, const core::rect< s32 > *clip=0, const video::SColor &color=video::SColor(255, 255, 255, 255), u32 starttime=0, u32 currenttime=0, bool loop=true, bool center=false)=0
 Draws a sprite in 2d with position and color. More...
 
virtual void draw2DSpriteBatch (const core::array< u32 > &indices, const core::array< core::position2di > &pos, const core::rect< s32 > *clip=0, const video::SColor &color=video::SColor(255, 255, 255, 255), u32 starttime=0, u32 currenttime=0, bool loop=true, bool center=false)=0
 Draws a sprite batch in 2d using an array of positions and a color. More...
 
virtual core::array< core::rect< s32 > > & getPositions ()=0
 Returns the list of rectangles held by the sprite bank. More...
 
virtual core::array< SGUISprite > & getSprites ()=0
 Returns the array of animated sprites within the sprite bank. More...
 
virtual video::ITexturegetTexture (u32 index) const =0
 Gets the texture with the specified index. More...
 
virtual u32 getTextureCount () const =0
 Returns the number of textures held by the sprite bank. More...
 
virtual void setTexture (u32 index, video::ITexture *texture)=0
 Changes one of the textures in the sprite bank. More...
 
- Public Member Functions inherited from irr::IReferenceCounted
 IReferenceCounted ()
 Constructor. More...
 
virtual ~IReferenceCounted ()
 Destructor. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
const c8getDebugName () const
 Returns the debug name of the object. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object. More...
 

Detailed Description

Sprite bank interface.

See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank for more information how to use the spritebank.

Definition at line 45 of file IGUISpriteBank.h.

Member Function Documentation

§ addTexture()

virtual void irr::gui::IGUISpriteBank::addTexture ( video::ITexture texture)
pure virtual

Adds a texture to the sprite bank.

§ addTextureAsSprite()

virtual s32 irr::gui::IGUISpriteBank::addTextureAsSprite ( video::ITexture texture)
pure virtual

Add the texture and use it for a single non-animated sprite. The texture and the corresponding rectangle and sprite will all be added to the end of each array. returns the index of the sprite or -1 on failure

§ clear()

virtual void irr::gui::IGUISpriteBank::clear ( )
pure virtual

clears sprites, rectangles and textures

§ draw2DSprite()

virtual void irr::gui::IGUISpriteBank::draw2DSprite ( u32  index,
const core::position2di pos,
const core::rect< s32 > *  clip = 0,
const video::SColor color = video::SColor(255, 255, 255, 255),
u32  starttime = 0,
u32  currenttime = 0,
bool  loop = true,
bool  center = false 
)
pure virtual

Draws a sprite in 2d with position and color.

§ draw2DSpriteBatch()

virtual void irr::gui::IGUISpriteBank::draw2DSpriteBatch ( const core::array< u32 > &  indices,
const core::array< core::position2di > &  pos,
const core::rect< s32 > *  clip = 0,
const video::SColor color = video::SColor(255, 255, 255, 255),
u32  starttime = 0,
u32  currenttime = 0,
bool  loop = true,
bool  center = false 
)
pure virtual

Draws a sprite batch in 2d using an array of positions and a color.

§ getPositions()

virtual core::array< core::rect<s32> >& irr::gui::IGUISpriteBank::getPositions ( )
pure virtual

Returns the list of rectangles held by the sprite bank.

§ getSprites()

virtual core::array< SGUISprite >& irr::gui::IGUISpriteBank::getSprites ( )
pure virtual

Returns the array of animated sprites within the sprite bank.

§ getTexture()

virtual video::ITexture* irr::gui::IGUISpriteBank::getTexture ( u32  index) const
pure virtual

Gets the texture with the specified index.

§ getTextureCount()

virtual u32 irr::gui::IGUISpriteBank::getTextureCount ( ) const
pure virtual

Returns the number of textures held by the sprite bank.

§ setTexture()

virtual void irr::gui::IGUISpriteBank::setTexture ( u32  index,
video::ITexture texture 
)
pure virtual

Changes one of the textures in the sprite bank.


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