SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::DirectionalLightComponent Class Reference

DirectionalLightComponent Class. This class defines the specific behaves of DirectionalLightComponent. More...

#include <DirectionalLightComponent.h>

Inheritance diagram for Spices::DirectionalLightComponent:
Spices::Component

Public Member Functions

 DirectionalLightComponent (const glm::vec3 &color=glm::vec3(1.0f), float intensity=1.0f)
 Constructor Function.
 
 DirectionalLightComponent (const SpicesShader::DirectionalLight &directionalLight)
 Constructor Function. Init class variable. Usually call it.
 
virtual ~DirectionalLightComponent () override=default
 Destructor Function.
 
virtual void OnSerialize () override
 This interface defines how to serialize.
 
virtual void OnDeSerialize () override
 This interface defines how to deserialize.
 
virtual void DrawThis () override
 This interface defines how to draw this component to property panel.
 
const SpicesShader::DirectionalLight & GetLight () const
 Get the DirectionalLight variable.
 
void SetColor (const glm::vec3 &color)
 Set the DirectionalLight color.
 
void SetIntensity (float intensity)
 Set the DirectionalLight intensity.
 
virtual void OnComponentAdded (const entt::entity &entity)
 This interface defines the behaves on specific component added. Init with variable.
 

Protected Attributes

entt::entity m_Owner { entt::null }
 This component's Owner entity.
 

Private Attributes

SpicesShader::DirectionalLight m_DirectionalLight {}
 This DirectionalLight data this component handled.
 

Detailed Description

DirectionalLightComponent Class. This class defines the specific behaves of DirectionalLightComponent.

Definition at line 20 of file DirectionalLightComponent.h.


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