Tileson 1.4.0
A helpful json parser for Tiled maps
Loading...
Searching...
No Matches
Public Member Functions | List of all members
tson::WangTile Class Reference

#include <WangTile.hpp>

Public Member Functions

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

Constructor & Destructor Documentation

◆ WangTile() [1/2]

tson::WangTile::WangTile ( )
inlinedefault

◆ WangTile() [2/2]

tson::WangTile::WangTile ( IJson json)
inlineexplicit

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.

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