Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
EngineCore::SceneComponent Class Reference

A scene component has a transform. More...

#include <SceneComponent.h>

Inheritance diagram for EngineCore::SceneComponent:
Collaboration diagram for EngineCore::SceneComponent:

Public Member Functions

 SceneComponent (Scene *scene)
 SceneComponent (Scene *scene, const entt::entity &parent, const glm::mat4 &transform)
 SceneComponent (Scene *scene, const entt::entity &parent, const glm::vec3 &position)
 SceneComponent (Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::quat &rotation)
 SceneComponent (Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::vec3 &rotation)
 SceneComponent (Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::quat &rotation, const glm::vec3 &scale)
Public Member Functions inherited from EngineCore::LogicComponent
 LogicComponent (Scene *owningScene)
virtual ~LogicComponent ()=default
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 canTick () const
 Checks if the component is currently set to tick.
void setCanTick (bool enable)
 Enables or disables ticking for this component.
EntitygetOwningEntity () const
 Gets the entity this component belongs to.

Protected Attributes

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

Private Member Functions

void setParent (const entt::entity &parent)

Additional Inherited Members

Static Public Attributes inherited from EngineCore::LogicComponent
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.
Protected Member Functions inherited from EngineCore::LogicComponent
ScenegetScene () const
 Gets the scene this component belongs to.
SceneManagergetSceneManager () const
 Helper to get the SceneManager from the owning scene.

Detailed Description

A scene component has a transform.

Author
Konstantin Passig
Date
06.12.2025

Definition at line 22 of file SceneComponent.h.

Constructor & Destructor Documentation

◆ SceneComponent() [1/6]

EngineCore::SceneComponent::SceneComponent ( Scene * scene)
explicit

Definition at line 10 of file SceneComponent.cpp.

References EngineCore::LogicComponent::LogicComponent(), and EngineCore::LogicComponent::scene.

Here is the call graph for this function:

◆ SceneComponent() [2/6]

EngineCore::SceneComponent::SceneComponent ( Scene * scene,
const entt::entity & parent,
const glm::mat4 & transform )
explicit

Definition at line 12 of file SceneComponent.cpp.

References component, Ecs::RegistryManager::get(), EngineCore::LogicComponent::LogicComponent(), EngineCore::LogicComponent::scene, setParent(), and transformComponent.

Here is the call graph for this function:

◆ SceneComponent() [3/6]

EngineCore::SceneComponent::SceneComponent ( Scene * scene,
const entt::entity & parent,
const glm::vec3 & position )
explicit

Definition at line 24 of file SceneComponent.cpp.

References component, Ecs::RegistryManager::get(), EngineCore::LogicComponent::LogicComponent(), EngineCore::LogicComponent::scene, setParent(), Ecs::TransformOperators::setPosition(), and transformComponent.

Here is the call graph for this function:

◆ SceneComponent() [4/6]

EngineCore::SceneComponent::SceneComponent ( Scene * scene,
const entt::entity & parent,
const glm::vec3 & position,
const glm::quat & rotation )
explicit

Definition at line 36 of file SceneComponent.cpp.

References component, Ecs::RegistryManager::get(), EngineCore::LogicComponent::LogicComponent(), EngineCore::LogicComponent::scene, setParent(), Ecs::TransformOperators::setPosition(), Ecs::TransformOperators::setRotation(), and transformComponent.

Here is the call graph for this function:

◆ SceneComponent() [5/6]

EngineCore::SceneComponent::SceneComponent ( Scene * scene,
const entt::entity & parent,
const glm::vec3 & position,
const glm::vec3 & rotation )
explicit

Definition at line 50 of file SceneComponent.cpp.

References component, Ecs::RegistryManager::get(), EngineCore::LogicComponent::LogicComponent(), EngineCore::LogicComponent::scene, setParent(), Ecs::TransformOperators::setPosition(), Ecs::TransformOperators::setRotation(), and transformComponent.

Here is the call graph for this function:

◆ SceneComponent() [6/6]

EngineCore::SceneComponent::SceneComponent ( Scene * scene,
const entt::entity & parent,
const glm::vec3 & position,
const glm::quat & rotation,
const glm::vec3 & scale )
explicit

Definition at line 64 of file SceneComponent.cpp.

References component, Ecs::RegistryManager::get(), EngineCore::LogicComponent::LogicComponent(), EngineCore::LogicComponent::scene, setParent(), Ecs::TransformOperators::setPosition(), Ecs::TransformOperators::setRotation(), Ecs::TransformOperators::setScale(), and transformComponent.

Here is the call graph for this function:

Member Function Documentation

◆ setParent()

void EngineCore::SceneComponent::setParent ( const entt::entity & parent)
private

Definition at line 83 of file SceneComponent.cpp.

References Ecs::RegistryManager::get(), and parentComponent.

Referenced by SceneComponent(), SceneComponent(), SceneComponent(), SceneComponent(), and SceneComponent().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ component

entt::entity EngineCore::SceneComponent::component = entt::null
protected

Stores the data.

Definition at line 44 of file SceneComponent.h.

Referenced by SceneComponent(), SceneComponent(), SceneComponent(), SceneComponent(), and SceneComponent().

◆ parentComponent

Ecs::Parent* EngineCore::SceneComponent::parentComponent = nullptr
protected

Definition at line 47 of file SceneComponent.h.

Referenced by setParent().

◆ transformComponent

Ecs::LocalTransform* EngineCore::SceneComponent::transformComponent = nullptr
protected

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