libtmx
0.4.0
an C++11 library for reading TMX files
|
A tile is a rectangular part of a tileset. More...
#include <tmx/Tile.h>
Public Member Functions | |
Tile (unsigned id, const std::array< unsigned, 4 > &terrain, unsigned probability) | |
Tile constructor. More... | |
unsigned | getId () const noexcept |
Get the local id of the tile. More... | |
const std::array< unsigned, 4 > & | getTerrain () const noexcept |
Get the terrains on the four corners. More... | |
unsigned | getTopLeftTerrain () const noexcept |
Get the terrain in the top left corner. More... | |
unsigned | getTopRightTerrain () const noexcept |
Get the terrain in the top right corner. More... | |
unsigned | getBottomLeftTerrain () const noexcept |
Get the terrain in the bottom left corner. More... | |
unsigned | getBottomRightTerrain () const noexcept |
Get the terrain in the bottom right corner. More... | |
unsigned | getProbability () const noexcept |
Get the probability of this tile. More... | |
void | setImage (std::unique_ptr< Image > image) |
Get the image of this tile. More... | |
bool | hasImage () const noexcept |
Tell whether the tile has an image. More... | |
const Image * | getImage () const noexcept |
Get the image of this tile. More... | |
Public Member Functions inherited from tmx::Component | |
bool | hasProperty (const std::string &key) const noexcept |
Tell if the object has a given property. More... | |
const std::string & | getProperty (const std::string &key, const std::string &def) const noexcept |
Get a property value. More... | |
bool | addProperty (const std::string &key, const std::string &value) |
Add a property. More... | |
A tile is a rectangular part of a tileset.
|
inline |
Tile constructor.
|
inlinenoexcept |
Get the terrain in the bottom left corner.
|
inlinenoexcept |
Get the terrain in the bottom right corner.
|
inlinenoexcept |
Get the local id of the tile.
|
inlinenoexcept |
Get the image of this tile.
|
inlinenoexcept |
Get the probability of this tile.
|
inlinenoexcept |
Get the terrains on the four corners.
|
inlinenoexcept |
Get the terrain in the top left corner.
|
inlinenoexcept |
Get the terrain in the top right corner.
|
inlinenoexcept |
Tell whether the tile has an image.
|
inline |
Get the image of this tile.
image | the image of this tile |