|
| enum class | Types { TILE_LAYER
, OBJECT_GROUP
} |
|
|
virtual Types | getType () const =0 |
|
virtual void | clear () |
| void | setId (GlobalTileId id) |
| | Set the id of the layer (mostly for "Tiled" map editor compatibility)
|
| GlobalTileId | getId () const |
| | Get the id of the layer.
|
| void | setName (std::string_view name) |
| | Set the name of the layer.
|
| std::string const & | getName () const |
| | Get the name of the layer.
|
|
virtual void | save (nlohmann::json &jsonObject) |
|
virtual void | load (nlohmann::json const &jsonObject, std::filesystem::path const &filePath) |
|
template<class T> |
| constexpr T const * | as () const |
|
template<class T> |
| constexpr T * | as () |
|
void | setPosition (Vector2f const &position) |
|
Vector2f const & | getPosition () const |
|
void | move (Vector2f const &offset) |
|
void | setRotation (float angle) |
|
float | getRotation () const |
|
void | rotate (float angle) |
|
void | setScale (Vector2f const &factors) |
|
void | setScale (float factor) |
|
Vector2f const & | getScale () const |
|
void | scale (Vector2f const &factor) |
|
void | scale (float factor) |
|
void | setOrigin (Vector2f const &origin) |
|
Vector2f const & | getOrigin () const |
|
glm::mat4 const & | getTransform () const |
|
glm::mat4 const & | getInverseTransform () const |
| virtual void | draw (RenderTarget &target, RenderStates const &states) const =0 |
|
|
static std::shared_ptr< BaseLayer > | loadLayer (nlohmann::json const &jsonObject, std::filesystem::path const &filePath) |
◆ draw()
Implemented in fge::ObjAnimation, fge::ObjButton, fge::Object, fge::ObjLight, fge::ObjRenderMap, fge::ObjShaderChain, fge::ObjShape, fge::ObjSprite, fge::ObjSpriteBatches, fge::ObjSpriteCluster, fge::ObjSwitch, fge::ObjText, fge::ObjTileLayer, and fge::ObjWindow.
◆ getId()
| GlobalTileId fge::BaseLayer::getId |
( |
| ) |
const |
|
nodiscard |
Get the id of the layer.
- Returns
- The id of the layer
◆ getName()
| std::string const & fge::BaseLayer::getName |
( |
| ) |
const |
|
nodiscard |
Get the name of the layer.
- Returns
- The name of the layer
◆ setId()
| void fge::BaseLayer::setId |
( |
GlobalTileId | id | ) |
|
Set the id of the layer (mostly for "Tiled" map editor compatibility)
- Parameters
-
◆ setName()
| void fge::BaseLayer::setName |
( |
std::string_view | name | ) |
|
Set the name of the layer.
- Parameters
-
| name | The name of the layer |
The documentation for this class was generated from the following file: