Elevate Engine 1
Loading...
Searching...
No Matches
Elevate::Light Class Reference

#include <Light.h>

Inheritance diagram for Elevate::Light:
Elevate::Component EEObject Elevate::DirectionalLight Elevate::PointLight

Public Member Functions

 Light ()=default
 
 Light (const glm::vec3 &color)
 
 Light (const glm::vec3 &amb, const glm::vec3 &dif, const glm::vec3 &spec, float intensity=1.0f)
 
void SetColor (const glm::vec3 &color)
 
void SetAmbientColor (const glm::vec3 &color)
 
void SetDiffuseColor (const glm::vec3 &color)
 
void SetSpecularColor (const glm::vec3 &color)
 
void SetIntensity (const float &intensity)
 
const glm::vec3 & GetAmbientColor () const
 
const glm::vec3 & GetDiffuseColor () const
 
const glm::vec3 & GetSpecularColor () const
 
const float & GetIntensity () const
 
- Public Member Functions inherited from Elevate::Component
 Component ()=default
 
virtual ~Component ()=default
 
virtual ComponentClone ()=0
 
virtual void CopyFrom (Component *other)=0
 
virtual GameObjectComponentFactory GetFactory () const =0
 
virtual GameObjectComponentDestructor GetDestructor () const =0
 
virtual const void * GetEditorIconHandle () const
 
virtual std::type_index GetTypeIndex () const =0
 
void SetActive (bool newState)
 
bool IsActive ()
 
virtual ComponentLayout GetLayout () const
 
virtual bool RemoveFromGameObject ()
 
virtual std::string GetName () const
 
- Public Member Functions inherited from EEObject
virtual EECategory GetCategory () const
 

Protected Attributes

glm::vec3 m_ambientColor = { 1.0f, 1.0f, 1.0f }
 
glm::vec3 m_diffuseColor = { 1.0f, 1.0f, 1.0f }
 
glm::vec3 m_specularColor = { 1.0f, 1.0f, 1.0f }
 
float m_intensity = 1.0f
 
- Protected Attributes inherited from Elevate::Component
bool m_IsActive = true
 
- Protected Attributes inherited from EEObject
EECategory m_category
 

Additional Inherited Members

- Public Attributes inherited from Elevate::Component
std::function< bool()> RemoveFromGOFunc
 
GameObjectgameObject = nullptr
 
- Protected Member Functions inherited from Elevate::Component
virtual void Init ()
 
virtual void Destroy ()
 
virtual void Update ()
 
virtual void Render ()
 
virtual void RenderInEditor ()
 
virtual void RenderWhenSelected ()
 
virtual void OnSetPosition ()
 
virtual void OnSetRotation ()
 
virtual void OnSetScale ()
 
virtual void OnNotify (Event &event)
 

Detailed Description

Definition at line 11 of file Light.h.

Constructor & Destructor Documentation

◆ Light() [1/3]

Elevate::Light::Light ( )
default

◆ Light() [2/3]

Elevate::Light::Light ( const glm::vec3 &  color)
inline

Definition at line 19 of file Light.h.

20 : m_ambientColor(color), m_diffuseColor(color), m_specularColor(color) { }
glm::vec3 m_diffuseColor
Definition Light.h:45
glm::vec3 m_specularColor
Definition Light.h:46
glm::vec3 m_ambientColor
Definition Light.h:44

◆ Light() [3/3]

Elevate::Light::Light ( const glm::vec3 &  amb,
const glm::vec3 &  dif,
const glm::vec3 &  spec,
float  intensity = 1.0f 
)
inline

Definition at line 22 of file Light.h.

23 : m_ambientColor(amb), m_diffuseColor(dif), m_specularColor(spec), m_intensity(intensity) { }
float m_intensity
Definition Light.h:47

Member Function Documentation

◆ GetAmbientColor()

const glm::vec3 & Elevate::Light::GetAmbientColor ( ) const
inline

Definition at line 37 of file Light.h.

37{ return m_ambientColor; }

◆ GetDiffuseColor()

const glm::vec3 & Elevate::Light::GetDiffuseColor ( ) const
inline

Definition at line 38 of file Light.h.

38{ return m_diffuseColor; }

◆ GetIntensity()

const float & Elevate::Light::GetIntensity ( ) const
inline

Definition at line 40 of file Light.h.

40{ return m_intensity; }

◆ GetSpecularColor()

const glm::vec3 & Elevate::Light::GetSpecularColor ( ) const
inline

Definition at line 39 of file Light.h.

39{ return m_specularColor; }

◆ SetAmbientColor()

void Elevate::Light::SetAmbientColor ( const glm::vec3 &  color)
inline

Definition at line 32 of file Light.h.

32{ m_ambientColor = color; }

◆ SetColor()

void Elevate::Light::SetColor ( const glm::vec3 &  color)
inline

Definition at line 26 of file Light.h.

27 {
28 m_ambientColor = color;
29 m_diffuseColor = color;
30 m_specularColor = color;
31 }

◆ SetDiffuseColor()

void Elevate::Light::SetDiffuseColor ( const glm::vec3 &  color)
inline

Definition at line 33 of file Light.h.

33{ m_diffuseColor = color; }

◆ SetIntensity()

void Elevate::Light::SetIntensity ( const float &  intensity)
inline

Definition at line 35 of file Light.h.

35{ m_intensity = intensity; }

◆ SetSpecularColor()

void Elevate::Light::SetSpecularColor ( const glm::vec3 &  color)
inline

Definition at line 34 of file Light.h.

34{ m_specularColor = color; }

Member Data Documentation

◆ m_ambientColor

glm::vec3 Elevate::Light::m_ambientColor = { 1.0f, 1.0f, 1.0f }
protected

Definition at line 44 of file Light.h.

44{ 1.0f, 1.0f, 1.0f };

◆ m_diffuseColor

glm::vec3 Elevate::Light::m_diffuseColor = { 1.0f, 1.0f, 1.0f }
protected

Definition at line 45 of file Light.h.

45{ 1.0f, 1.0f, 1.0f };

◆ m_intensity

float Elevate::Light::m_intensity = 1.0f
protected

Definition at line 47 of file Light.h.

◆ m_specularColor

glm::vec3 Elevate::Light::m_specularColor = { 1.0f, 1.0f, 1.0f }
protected

Definition at line 46 of file Light.h.

46{ 1.0f, 1.0f, 1.0f };

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