21 #ifndef GF_TILE_LAYER_H 22 #define GF_TILE_LAYER_H 29 #include "GraphicsApi.h" 31 #include "TileProperties.h" 33 #include "TileTypes.h" 34 #include "Transformable.h" 35 #include "VertexArray.h" 36 #include "VertexBuffer.h" 39 #ifndef DOXYGEN_SHOULD_SKIP_THIS 64 static constexpr
int NoTile = -1;
81 return m_tiles.getSize();
94 std::size_t createTilesetId();
102 Tileset& getTileset(std::size_t
id);
110 const Tileset& getTileset(std::size_t
id)
const;
126 void setTileSize(
Vector2i tileSize);
156 int getTile(
Vector2i position)
const;
174 std::size_t getTileTileset(
Vector2i position)
const;
194 RectF getLocalBounds()
const;
206 void setAnchor(
Anchor anchor);
225 std::size_t tileset = -1;
236 void fillVertexArray(std::vector<Sheet>& sheets,
RectI rect)
const;
237 void updateGeometry();
238 RectI computeOffsets()
const;
242 std::unique_ptr<TileProperties> m_properties;
247 std::vector<Sheet> m_sheets;
253 #ifndef DOXYGEN_SHOULD_SKIP_THIS 258 #endif // GF_TILE_LAYER_H
Vector2i getTileSize() const
Get the tile size.
Definition: TileLayer.h:134
A set of primitives.
Definition: VertexArray.h:65
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:102
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
TileOrientation
The orientation of the tile.
Definition: TileTypes.h:37
Data in the graphics memory.
Definition: VertexBuffer.h:81
A tileset.
Definition: Tileset.h:48
GF_CORE_API Orientation orientation(float angle)
Get an orientation from an angle.
Vector2i getMapSize() const
Get the size of the layer.
Definition: TileLayer.h:80
The namespace for gf classes.
Definition: Action.h:35
A tile layer.
Definition: TileLayer.h:59
MapCellIndex
Map cell index in a map celled or hexagonal map.
Definition: MapCell.h:35
Anchor
An anchor of a box.
Definition: Anchor.h:38
MapCellAxis
Map cell axis in a map celled.
Definition: MapCell.h:46