Uranus  1.0.1.0
Uranus is a GameEngine written in C++
Loading...
Searching...
No Matches
tson::WangTile Class Reference
Collaboration diagram for tson::WangTile:
[legend]

Public Member Functions

 WangTile (IJson &json)
 
uint32_t getTileid () const
 
const std::vector< uint32_t > & getWangIds () const
 
bool hasDFlip () const
 
bool hasHFlip () const
 
bool hasVFlip () const
 
bool parse (IJson &json)
 

Private Attributes

bool m_dflip {}
 
bool m_hflip {}
 
uint32_t m_tileid {}
 
bool m_vflip {}
 
std::vector< uint32_t > m_wangId
 

Member Function Documentation

◆ getTileid()

uint32_t tson::WangTile::getTileid ( ) const
inline

'tileid': Local ID of tile

Returns

◆ getWangIds()

const std::vector< uint32_t > & tson::WangTile::getWangIds ( ) const
inline

'wangid': Array of Wang color indexes (uchar[8])

Returns

◆ hasDFlip()

bool tson::WangTile::hasDFlip ( ) const
inline

'dflip': Tile is flipped diagonally

NB! This property got removed in Tiled v1.5

Returns

◆ hasHFlip()

bool tson::WangTile::hasHFlip ( ) const
inline

'hflip': Tile is flipped horizontally

NB! This property got removed in Tiled v1.5

Returns

◆ hasVFlip()

bool tson::WangTile::hasVFlip ( ) const
inline

'vflip': Tile is flipped vertically

NB! This property got removed in Tiled v1.5

Returns

◆ parse()

bool tson::WangTile::parse ( IJson json)
inline

Parses a wang tile from Tiled json.

Parameters
jsonA Tiled json file
Returns
true if all mandatory fields were found. False otherwise.

Field Documentation

◆ m_hflip

bool tson::WangTile::m_hflip {}
private

'dflip': Tile is flipped diagonally

◆ m_tileid

uint32_t tson::WangTile::m_tileid {}
private

'hflip': Tile is flipped horizontally

◆ m_vflip

bool tson::WangTile::m_vflip {}
private

'tileid': Local ID of tile

◆ m_wangId

std::vector<uint32_t> tson::WangTile::m_wangId
private

'vflip': Tile is flipped vertically


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