Class Layer#
Defined in File Layer.h
Inheritance Relationships#
Derived Type#
public TRAP::ImGuiLayer
(Class ImGuiLayer)
Class Documentation#
-
class Layer#
Subclassed by TRAP::ImGuiLayer
Public Functions
-
explicit constexpr Layer(std::string debugName = "Layer") noexcept#
Constructor.
- Parameters:
debugName – Layer name for debugging.
-
virtual constexpr ~Layer() = default#
Destructor.
-
virtual void OnUpdate(const Utils::TimeStep &deltaTime)#
Called every frame.
- Parameters:
deltaTime – Time difference between current and last frame.
-
virtual void OnTick(const Utils::TimeStep &deltaTime)#
Called every tick (default 100 ticks).
- Parameters:
deltaTime – Time difference between current and last tick.
-
virtual void OnImGuiRender()#
Called every frame. Should be used for debug GUIs.
-
virtual void OnEvent(Events::Event &event)#
Called when an event occurs.
- Parameters:
event – Event that occurred.
-
constexpr std::string GetName() const noexcept#
Retrieve the debug name of the layer.
- Returns:
Name of the layer.
Protected Attributes
-
std::string m_DebugName#
-
explicit constexpr Layer(std::string debugName = "Layer") noexcept#