Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Components::Scene Class Reference

A scene component has a transform. More...

#include <SceneComponent.h>

Inheritance diagram for Engine::Components::Scene:
Collaboration diagram for Engine::Components::Scene:

Public Member Functions

 Scene (Entities::Scene *scene)
 Scene (Entities::Scene *scene, const entt::entity &parent, const glm::mat4 &transform)
 Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position)
 Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::quat &rotation)
 Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::vec3 &rotation)
 Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::quat &rotation, const glm::vec3 &scale)
Public Member Functions inherited from Engine::Components::Logic
 Logic (Entities::Scene *owningScene)
virtual ~Logic ()=default
virtual std::string getComponentName () const
 Gets the component type name for debugging/UI.
virtual void beginPlay ()
 Called when the component is added to the scene or the game starts.
virtual void tick (double deltaTime)
 Called every frame if ticking is enabled.
virtual void endPlay ()
 Called when the component is removed or the game ends.
bool hasBegunPlay () const
bool canTick () const
 Checks if the component is currently set to tick.
void setCanTick (bool enable)
 Enables or disables ticking for this component.
Entities::EntitygetOwningEntity () const
 Gets the entity this component belongs to.

Protected Attributes

entt::entity component = entt::null
 Stores the data.
Ecs::TransformtransformComponent = nullptr
Ecs::ParentparentComponent = nullptr

Private Member Functions

void setParent (const entt::entity &parent)

Additional Inherited Members

Static Public Attributes inherited from Engine::Components::Logic
static constexpr bool IsUnique = false
 Defines whether multiple instances of this component can exist on the same entity. Defaults to false (multiple allowed). Override in derived classes with static constexpr bool IsUnique = true; if needed.
static constexpr const char * ComponentName = "Logic"
 Fallback component type name. Derived classes may override getComponentName() for custom labels.
Protected Member Functions inherited from Engine::Components::Logic
Entities::ScenegetScene () const
 Gets the scene this component belongs to.
Core::SceneManagergetSceneManager () const
 Helper to get the SceneManager from the owning scene.

Detailed Description

A scene component has a transform.

Definition at line 25 of file SceneComponent.h.

Constructor & Destructor Documentation

◆ Scene() [1/6]

Engine::Components::Scene::Scene ( Entities::Scene * scene)
explicit

◆ Scene() [2/6]

Engine::Components::Scene::Scene ( Entities::Scene * scene,
const entt::entity & parent,
const glm::mat4 & transform )
explicit

◆ Scene() [3/6]

Engine::Components::Scene::Scene ( Entities::Scene * scene,
const entt::entity & parent,
const glm::vec3 & position )
explicit

◆ Scene() [4/6]

Engine::Components::Scene::Scene ( Entities::Scene * scene,
const entt::entity & parent,
const glm::vec3 & position,
const glm::quat & rotation )
explicit

◆ Scene() [5/6]

Engine::Components::Scene::Scene ( Entities::Scene * scene,
const entt::entity & parent,
const glm::vec3 & position,
const glm::vec3 & rotation )
explicit

◆ Scene() [6/6]

Engine::Components::Scene::Scene ( Entities::Scene * scene,
const entt::entity & parent,
const glm::vec3 & position,
const glm::quat & rotation,
const glm::vec3 & scale )
explicit

Member Function Documentation

◆ setParent()

void Engine::Components::Scene::setParent ( const entt::entity & parent)
private

Member Data Documentation

◆ component

entt::entity Engine::Components::Scene::component = entt::null
protected

Stores the data.

Definition at line 47 of file SceneComponent.h.

◆ parentComponent

Ecs::Parent* Engine::Components::Scene::parentComponent = nullptr
protected

Definition at line 50 of file SceneComponent.h.

◆ transformComponent

Ecs::Transform* Engine::Components::Scene::transformComponent = nullptr
protected

Definition at line 49 of file SceneComponent.h.


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Component/SceneComponent.h