Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Components::WindTrail Class Reference

Logic component that owns a wind trail emitter scene node. More...

#include <WindTrailComponent.h>

Inheritance diagram for Engine::Components::WindTrail:
Collaboration diagram for Engine::Components::WindTrail:

Public Member Functions

 WindTrail (Entities::Scene *owningScene)
 Constructs a wind trail component for a scene.
 ~WindTrail () override=default
 Destroys the wind trail component.
void beginPlay () override
 Called when the component is added to the scene or the game starts.
void endPlay () override
 Called when the component is removed or the game ends.
std::shared_ptr< Entities::SceneNode > getEmitterNode () const
 Gets the scene node used as the trail emitter.
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 tick (double deltaTime)
 Called every frame if ticking is enabled.
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.

Static Public Attributes

static constexpr bool IsUnique = true
 This component type is unique per actor.
static constexpr const char * ComponentName = "WindTrail"
 Component registry name.
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.

Private Attributes

std::shared_ptr< Entities::SceneNode > emitterNode_

Additional Inherited Members

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.

Detailed Description

Logic component that owns a wind trail emitter scene node.

Definition at line 17 of file WindTrailComponent.h.

Constructor & Destructor Documentation

◆ WindTrail()

Engine::Components::WindTrail::WindTrail ( Entities::Scene * owningScene)
explicit

Constructs a wind trail component for a scene.

Parameters
owningSceneScene that owns this component.

◆ ~WindTrail()

Engine::Components::WindTrail::~WindTrail ( )
overridedefault

Destroys the wind trail component.

Member Function Documentation

◆ beginPlay()

void Engine::Components::WindTrail::beginPlay ( )
overridevirtual

Called when the component is added to the scene or the game starts.

Reimplemented from Engine::Components::Logic.

◆ endPlay()

void Engine::Components::WindTrail::endPlay ( )
overridevirtual

Called when the component is removed or the game ends.

Reimplemented from Engine::Components::Logic.

◆ getEmitterNode()

std::shared_ptr< Entities::SceneNode > Engine::Components::WindTrail::getEmitterNode ( ) const
inlinenodiscard

Gets the scene node used as the trail emitter.

Returns
Emitter scene node, or nullptr before beginPlay creates it.

Definition at line 41 of file WindTrailComponent.h.

References emitterNode_.

Member Data Documentation

◆ ComponentName

const char* Engine::Components::WindTrail::ComponentName = "WindTrail"
staticconstexpr

Component registry name.

Definition at line 21 of file WindTrailComponent.h.

◆ emitterNode_

std::shared_ptr<Entities::SceneNode> Engine::Components::WindTrail::emitterNode_
private

Definition at line 47 of file WindTrailComponent.h.

Referenced by getEmitterNode().

◆ IsUnique

bool Engine::Components::WindTrail::IsUnique = true
staticconstexpr

This component type is unique per actor.

Definition at line 20 of file WindTrailComponent.h.


The documentation for this class was generated from the following file: