zenilib: Zeni::Sprite Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
Zeni::Sprite Class Reference

`#include <Texture.h>`

Inherits Zeni::Texture.

## Public Member Functions

| Sprite ()
| Sprite (const Sprite &rhs)
void | append_frame (const String &name)
| Add a frame to the Sprite. More...
void | append_frame (const String &name, const unsigned long &id)
| Add a frame to the Sprite. More...
virtual void | apply_Texture () const
| Apply the current Texture frame to upcoming polygons. More...
int | find_frame (const String &name, const int &starting_point=0) const
| Search for a frame. More...
int | get_current_frame () const
| Get the currently selected frame number. More...
int | get_num_frames () const
| Get the number of frames. More...
const Point2i & | get_size () const
| Get the resolution of the current Texture on the GPU. More...
void | insert_frame (const String &name, const int &at_this_index)
| Insert a frame. More...
void | insert_frame (const String &name, const unsigned long &id, const int &at_this_index)
| Insert a frame. More...
Sprite & | operator= (const Sprite &rhs)
void | remove_frame (const int &frame_number)
| Remove a frame. More...
void | set_current_frame (const int &frame_number)
| Set this frame. More...
Public Member Functions inherited from Zeni::Texture
| Texture (const bool &repeat_)
virtual | ~Texture ()

## Additional Inherited Members

Protected Attributes inherited from Zeni::Texture
const bool | m_repeat

## Detailed Description

Definition at line 77 of file Texture.h.

## Constructor & Destructor Documentation

Zeni::Sprite::Sprite | ( |  | ) |

Definition at line 32 of file Texture.cpp.

Zeni::Sprite::Sprite | ( | const Sprite & | rhs | ) |

Definition at line 38 of file Texture.cpp.

## Member Function Documentation

void Zeni::Sprite::append_frame | ( | const String & | name | ) |

Add a frame to the Sprite.

Definition at line 52 of file Texture.cpp.

References Zeni::get_Textures().

void Zeni::Sprite::append_frame | ( | const String & | name,
|  | const unsigned long & | id
| ) |  |

Add a frame to the Sprite.

Definition at line 56 of file Texture.cpp.

void Zeni::Sprite::apply_Texture | ( |  | ) | const

virtual

Apply the current Texture frame to upcoming polygons.

Implements Zeni::Texture.

Definition at line 119 of file Texture.cpp.

References Zeni::Textures::apply_Texture(), Zeni::Database< TYPE >::get_id(), Zeni::get_Textures(), and int.

int Zeni::Sprite::find_frame | ( | const String & | name,
|  | const int & | starting_point = `0`
| ) |  | const

Search for a frame.

Definition at line 60 of file Texture.cpp.

References i.

int Zeni::Sprite::get_current_frame | ( |  | ) | const

Get the currently selected frame number.

Definition at line 106 of file Texture.cpp.

Referenced by Zeni::decrement_sprite_frame(), Zeni::Textures::get_current_frame(), and Zeni::increment_sprite_frame().

int Zeni::Sprite::get_num_frames | ( |  | ) | const

Get the number of frames.

Definition at line 102 of file Texture.cpp.

References int.

Referenced by Zeni::decrement_sprite_frame(), Zeni::Textures::get_num_frames(), and Zeni::increment_sprite_frame().

const Point2i & Zeni::Sprite::get_size | ( |  | ) | const

inlinevirtual

Get the resolution of the current Texture on the GPU.

Implements Zeni::Texture.

Definition at line 37 of file Texture.hxx.

References Zeni::Database< TYPE >::get_id(), and Zeni::get_Textures().

void Zeni::Sprite::insert_frame | ( | const String & | name,
|  | const int & | at_this_index
| ) |  |

Insert a frame.

Definition at line 70 of file Texture.cpp.

References Zeni::get_Textures().

void Zeni::Sprite::insert_frame | ( | const String & | name,
|  | const unsigned long & | id,
|  | const int & | at_this_index
| ) |  |

Insert a frame.

Definition at line 74 of file Texture.cpp.

References memmove.

Sprite & Zeni::Sprite::operator= | ( | const Sprite & | rhs | ) |

Definition at line 45 of file Texture.cpp.

References swap().

void Zeni::Sprite::remove_frame | ( | const int & | frame_number | ) |

Remove a frame.

Definition at line 90 of file Texture.cpp.

References memmove.

void Zeni::Sprite::set_current_frame | ( | const int & | frame_number | ) |

Set this frame.

Definition at line 112 of file Texture.cpp.

Referenced by Zeni::decrement_sprite_frame(), Zeni::increment_sprite_frame(), and Zeni::Textures::set_current_frame().

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

- zenilib/jni/external/zenilib/zeni_graphics/Zeni/Texture.h
- zenilib/jni/external/zenilib/zeni_graphics/Texture.cpp
- zenilib/jni/external/zenilib/zeni_graphics/Zeni/Texture.hxx