|
| TileSet (fge::Texture texture) |
| TileSet (fge::Texture texture, fge::Vector2i const &tileSize) |
| TileSet (fge::Texture texture, fge::Vector2i const &tileSize, fge::Vector2i const &offset) |
void | clearTiles () |
| Clear the tiles.
|
void | setName (std::string name) |
| Set the name of the TileSet.
|
std::string const & | getName () const |
| Get the name of the TileSet.
|
bool | valid () const |
| Check if the TileSet have a valid Texture.
|
fge::Texture const & | getTexture () const |
| Get the texture of the TileSet.
|
void | setTexture (fge::Texture texture) |
| Set the texture of the TileSet.
|
fge::Vector2i const & | getTileSize () const |
| Get the tile size of the TileSet.
|
void | setTileSize (fge::Vector2i const &tileSize) |
| Set the tile size of the TileSet.
|
fge::Vector2i const & | getOffset () const |
| Get the offset in pixel of the TileSet.
|
void | setOffset (fge::Vector2i const &offset) |
| Set the offset in pixel of the TileSet.
|
std::size_t | getTileCount () const |
| Get the total number of tiles in the TileSet.
|
fge::TileData const * | getTile (LocalTileId id) const |
| Retrieve a tile by its local id.
|
LocalTileId | getLocalId (fge::Vector2i const &position) const |
| Get the local id of a tile by its grid position.
|
LocalTileId | getLocalId (GlobalTileId gid) const |
| Get the local id of a tile by its global id.
|
GlobalTileId | getGlobalId (LocalTileId id) const |
bool | containsGlobal (GlobalTileId gid) const |
| Check if the global id is in the tileset.
|
bool | containsLocal (LocalTileId id) const |
void | setFirstGid (GlobalTileId gid) |
| Set the first global id of the tileset.
|
GlobalTileId | getFirstGid () const |
| Get the first global id of the tileset.
|
TileListType::const_iterator | begin () const |
TileListType::const_iterator | end () const |
void | slice () |
| Slice the texture into tiles.
|
int | getColumns () const |
| Return the number of columns in the texture.
|
int | getRows () const |
| Return the number of rows in the texture.
|
std::optional< fge::RectInt > | getTextureRect (LocalTileId id) const |
| Get the texture rectangle of a tile by its local id.
|
fge::RectInt | computeTextureRect (LocalTileId id) const |
| Compute the supposed texture rectangle with a local id.
|
fge::TileSet & | operator= (fge::Texture texture) |
A class that represent a set of tiles that can be used in a TileLayer.
This class is compatible with the "Tiled" map editor.