#include <tiletemplate.h>
|
| TileTemplate (QColor color=Qt::white, QString name="New Tile Template", float height=0, float thickness=1, TileMaterial *topMaterial=nullptr, QVector2D position=QVector2D(0.5, 0.5), bool bridgeTiles=false, bool connectDiagonals=false, QObject *parent=nullptr) |
|
void | setHeight (float height) |
|
float | setThickness (float thickness) |
| setThickness More...
|
|
QVector2D | setPosition (QVector2D position) |
| setPosition More...
|
|
void | setColor (QColor color) |
|
void | setHasSideMaterial (bool enabled) |
|
void | setTopMaterial (TileMaterial *material) |
| Updates the top material for the tile template. More...
|
|
void | setSideMaterial (TileMaterial *material) |
| Updates the side material for the tile template. More...
|
|
QString | name () const |
|
void | setName (QString name) |
|
float | height () const |
|
float | thickness () const |
|
QVector2D | position () const |
|
QColor | color () const |
|
bool | hasSideMaterial () |
|
const TileMaterial * | topMaterial () const |
|
TileMaterial * | topMaterial () |
|
const TileMaterial * | sideMaterial () const |
|
TileMaterial * | sideMaterial () |
|
bool | bridgeTiles () const |
|
void | setBridgeTiles (bool enabled) |
|
bool | connectDiagonals () const |
|
void | setConnectDiagonals (bool enabled) |
|
void | emitTilePing () |
| emitTilePing Sends a signal to all tiles using this template, which will be forwarded to the containing TileMap, and handled there. Useful for gathing all tiles used by this template. More...
|
|
◆ TileTemplate()
TileTemplate::TileTemplate |
( |
QColor |
color = Qt::white , |
|
|
QString |
name = "New Tile Template" , |
|
|
float |
height = 0 , |
|
|
float |
thickness = 1 , |
|
|
TileMaterial * |
topMaterial = nullptr , |
|
|
QVector2D |
position = QVector2D(0.5, 0.5) , |
|
|
bool |
bridgeTiles = false , |
|
|
bool |
connectDiagonals = false , |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
explicit |
◆ bridgeTiles()
bool TileTemplate::bridgeTiles |
( |
| ) |
const |
|
inline |
◆ changed
void TileTemplate::changed |
( |
| ) |
|
|
signal |
Emitted whenever something changes that needs to be saved.
◆ color()
QColor TileTemplate::color |
( |
| ) |
const |
|
inline |
◆ connectDiagonals()
bool TileTemplate::connectDiagonals |
( |
| ) |
const |
|
inline |
◆ emitTilePing()
void TileTemplate::emitTilePing |
( |
| ) |
|
|
inline |
emitTilePing Sends a signal to all tiles using this template, which will be forwarded to the containing TileMap, and handled there. Useful for gathing all tiles used by this template.
◆ exclusivePropertyChanged
void TileTemplate::exclusivePropertyChanged |
( |
| ) |
|
|
signal |
Emitted when a property is changed but does not affect mesh-related properties.
◆ hasSideMaterial()
bool TileTemplate::hasSideMaterial |
( |
| ) |
|
|
inline |
◆ height()
float TileTemplate::height |
( |
| ) |
const |
|
inline |
◆ materialChanged
void TileTemplate::materialChanged |
( |
| ) |
|
|
signal |
◆ name()
QString TileTemplate::name |
( |
| ) |
const |
|
inline |
◆ pingTiles
void TileTemplate::pingTiles |
( |
| ) |
|
|
signal |
◆ position()
QVector2D TileTemplate::position |
( |
| ) |
const |
|
inline |
◆ positionChanged
void TileTemplate::positionChanged |
( |
| ) |
|
|
signal |
◆ setBridgeTiles()
void TileTemplate::setBridgeTiles |
( |
bool |
enabled | ) |
|
◆ setColor()
void TileTemplate::setColor |
( |
QColor |
color | ) |
|
◆ setConnectDiagonals()
void TileTemplate::setConnectDiagonals |
( |
bool |
enabled | ) |
|
◆ setHasSideMaterial()
void TileTemplate::setHasSideMaterial |
( |
bool |
enabled | ) |
|
◆ setHeight()
void TileTemplate::setHeight |
( |
float |
height | ) |
|
◆ setName()
void TileTemplate::setName |
( |
QString |
name | ) |
|
|
inline |
◆ setPosition()
QVector2D TileTemplate::setPosition |
( |
QVector2D |
position | ) |
|
setPosition
Tries to set the position of this template. If moving position away from the center, it is possible that it would make the bounds of the tile go outside the grid bounds. If this is the case, the position actually set will be different than that requested. The position value actually set is returned.
- Parameters
-
- Returns
◆ setSideMaterial()
void TileTemplate::setSideMaterial |
( |
TileMaterial * |
material | ) |
|
Updates the side material for the tile template.
- Parameters
-
material | A pointer to the new material. |
◆ setThickness()
float TileTemplate::setThickness |
( |
float |
thickness | ) |
|
setThickness
Tries to set the thickness of this template. If increasing thickness, it is possible that it would make the bounds of the tile go outside the grid bounds (for example if the position is not centered). If this is the case, the thickness actually set will be less than that requested. The thickness value actually set is returned.
- Parameters
-
- Returns
◆ setTopMaterial()
void TileTemplate::setTopMaterial |
( |
TileMaterial * |
material | ) |
|
Updates the top material for the tile template.
- Parameters
-
material | A pointer to the new material. |
◆ sideMaterial() [1/2]
◆ sideMaterial() [2/2]
◆ thickness()
float TileTemplate::thickness |
( |
| ) |
const |
|
inline |
◆ thicknessChanged
void TileTemplate::thicknessChanged |
( |
| ) |
|
|
signal |
◆ topMaterial() [1/2]
◆ topMaterial() [2/2]
The documentation for this class was generated from the following files: