#include <Tilemap.hpp>
|
| Tilemap (u16 width, u16 height, Tileset &tileset, const std::vector< std::vector< u16 >> &data) |
|
void | reset () |
|
void | update () |
|
void | updateTiles () |
|
u16 | getTile (u16 tileX, u16 tileY, u8 layer=0) |
|
void | setTile (u16 tileX, u16 tileY, u16 id, bool write=true, bool persistent=false) |
|
bool | inTile (float x, float y, u16 tileID) |
|
u16 | width () const |
|
u16 | height () const |
|
u8 | layerCount () const |
|
Tileset & | tileset () |
|
void | setTilesetOffset (u16 tilesetOffset) |
|
virtual | ~IDrawable ()=default |
| Virtual destructor. More...
|
|
virtual | ~Transformable ()=default |
|
void | setPosition (float x, float y, float z=0) |
|
void | setPosition (const Vector3f &position) |
|
void | setOrigin (float x, float y, float z=0) |
|
void | setOrigin (const Vector3f &origin) |
|
void | setScale (float factorX, float factorY, float factorZ=1) |
|
void | setScale (const Vector3f &factors) |
|
void | setRotation (float angle) |
|
void | setRotation (float angle, const Vector3f &axis) |
|
const Vector3f & | getPosition () const |
|
const Vector3f & | getOrigin () const |
|
const Vector3f & | getScale () const |
|
float | getRotation () const |
|
void | move (float offsetX, float offsetY, float offsetZ=0) |
|
void | move (const Vector3f &offset) |
|
void | scale (float factorX, float factorY, float factorZ=1) |
|
void | scale (const Vector3f &factor) |
|
void | rotate (float angle) |
|
void | rotate (float angle, const Vector3f &axis) |
|
const Transform & | getTransform () const |
|
Definition at line 24 of file Tilemap.hpp.
§ Tilemap()
gk::Tilemap::Tilemap |
( |
u16 |
width, |
|
|
u16 |
height, |
|
|
Tileset & |
tileset, |
|
|
const std::vector< std::vector< u16 >> & |
data |
|
) |
| |
§ draw()
Draw the object to a render target.
This is a pure virtual function that has to be implemented by the derived class to define how the drawable should be drawn.
- Parameters
-
target | Render target to draw to |
states | Current render states |
Implements gk::IDrawable.
Definition at line 42 of file Tilemap.cpp.
§ getTile()
u16 gk::Tilemap::getTile |
( |
u16 |
tileX, |
|
|
u16 |
tileY, |
|
|
u8 |
layer = 0 |
|
) |
| |
§ height()
u16 gk::Tilemap::height |
( |
| ) |
const |
|
inline |
§ inTile()
bool gk::Tilemap::inTile |
( |
float |
x, |
|
|
float |
y, |
|
|
u16 |
tileID |
|
) |
| |
§ layerCount()
u8 gk::Tilemap::layerCount |
( |
| ) |
const |
|
inline |
§ reset()
void gk::Tilemap::reset |
( |
| ) |
|
§ setTile()
void gk::Tilemap::setTile |
( |
u16 |
tileX, |
|
|
u16 |
tileY, |
|
|
u16 |
id, |
|
|
bool |
write = true , |
|
|
bool |
persistent = false |
|
) |
| |
§ setTilesetOffset()
void gk::Tilemap::setTilesetOffset |
( |
u16 |
tilesetOffset | ) |
|
|
inline |
§ tileset()
§ update()
void gk::Tilemap::update |
( |
| ) |
|
§ updateTiles()
void gk::Tilemap::updateTiles |
( |
| ) |
|
§ width()
u16 gk::Tilemap::width |
( |
| ) |
const |
|
inline |
§ m_animator
§ m_baseData
std::vector<std::vector<u16> > gk::Tilemap::m_baseData |
|
private |
§ m_data
std::vector<std::vector<u16> > gk::Tilemap::m_data |
|
private |
§ m_height
u16 gk::Tilemap::m_height = 0 |
|
private |
§ m_renderer
§ m_tileset
§ m_tilesetOffset
u16 gk::Tilemap::m_tilesetOffset = 0 |
|
private |
§ m_width
u16 gk::Tilemap::m_width = 0 |
|
private |
The documentation for this class was generated from the following files: