|
Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
|
A scene component has a transform. More...
#include <SceneComponent.h>
Public Member Functions | |
| Scene (Entities::Scene *scene) | |
| Constructs a scene component without creating a transform entity. | |
| Scene (Entities::Scene *scene, const entt::entity &parent, const glm::mat4 &transform) | |
| Constructs a scene component with an explicit local transform matrix. | |
| Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position) | |
| Constructs a scene component at a local position. | |
| Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::quat &rotation) | |
| Constructs a scene component at a local position and quaternion rotation. | |
| Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::vec3 &rotation) | |
| Constructs a scene component at a local position and Euler rotation. | |
| Scene (Entities::Scene *scene, const entt::entity &parent, const glm::vec3 &position, const glm::quat &rotation, const glm::vec3 &scale) | |
| Constructs a scene component with local position, rotation, and scale. | |
| Public Member Functions inherited from Engine::Components::Logic | |
| Logic (Entities::Scene *owningScene) | |
| Constructs a logic component owned by a scene. | |
| Logic (const Entities::SpawnContext &context) | |
| Constructs a logic component from spawn context data. | |
| virtual | ~Logic ()=default |
| Destroys the logic component. | |
| virtual std::string | getComponentName () const |
| Gets the component type name for debugging/UI. | |
| virtual bool | drawImGui () |
| Draws component-specific ImGui inspector controls. | |
| virtual bool | drawImGuiName () |
| Used to alter the name of the entity in the outliner. | |
| 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 |
| Checks whether beginPlay() has been called without a matching endPlay(). | |
| bool | canTick () const |
| Checks if the component is currently set to tick. | |
| void | setCanTick (bool enable) |
| Enables or disables ticking for this component. | |
| Entities::Entity * | getOwningEntity () const |
| Gets the entity this component belongs to. | |
Protected Attributes | |
| entt::entity | component = entt::null |
| Stores the data. | |
| Ecs::Transform * | transformComponent = nullptr |
| Transform data stored on the created ECS component entity. | |
| Ecs::Parent * | parentComponent = nullptr |
| Parent relationship stored on the transform hierarchy entity. | |
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::Scene * | getScene () const |
| Gets the scene this component belongs to. | |
| Core::SceneManager * | getSceneManager () const |
| Helper to get the SceneManager from the owning scene. | |
A scene component has a transform.
Definition at line 25 of file SceneComponent.h.
|
explicit |
Constructs a scene component without creating a transform entity.
| scene | Owning scene for this component. |
|
explicit |
Constructs a scene component with an explicit local transform matrix.
| scene | Owning scene for this component. |
| parent | Parent ECS entity for the transform hierarchy. |
| transform | Local transform matrix to store on the created entity. |
|
explicit |
Constructs a scene component at a local position.
| scene | Owning scene for this component. |
| parent | Parent ECS entity for the transform hierarchy. |
| position | Local position for the created transform. |
|
explicit |
Constructs a scene component at a local position and quaternion rotation.
| scene | Owning scene for this component. |
| parent | Parent ECS entity for the transform hierarchy. |
| position | Local position for the created transform. |
| rotation | Local rotation for the created transform. |
|
explicit |
Constructs a scene component at a local position and Euler rotation.
| scene | Owning scene for this component. |
| parent | Parent ECS entity for the transform hierarchy. |
| position | Local position for the created transform. |
| rotation | Local Euler rotation for the created transform. |
|
explicit |
Constructs a scene component with local position, rotation, and scale.
| scene | Owning scene for this component. |
| parent | Parent ECS entity for the transform hierarchy. |
| position | Local position for the created transform. |
| rotation | Local rotation for the created transform. |
| scale | Local scale for the created transform. |
|
private |
|
protected |
Stores the data.
Definition at line 90 of file SceneComponent.h.
|
protected |
Parent relationship stored on the transform hierarchy entity.
Definition at line 93 of file SceneComponent.h.
|
protected |
Transform data stored on the created ECS component entity.
Definition at line 92 of file SceneComponent.h.