Saga
Saga Game Engine
Loading...
Searching...
No Matches
Saga::Light Struct Reference

Model a light. Wrapper around GraphicsEngine's light. Currently only support Point and Directional Lights. More...

#include <light.h>

Public Member Functions

 operator const std::shared_ptr< GraphicsEngine::Light > & () const
 
 Light ()
 Construct a new Light object. Should not be used.
 
 Light (GraphicsEngine::LightType type, glm::vec3 lightData, glm::vec3 lightColor=glm::vec3(1))
 Construct a new Light object of a certain type.
 

Public Attributes

std::shared_ptr< GraphicsEngine::Light > light
 

Detailed Description

Model a light. Wrapper around GraphicsEngine's light. Currently only support Point and Directional Lights.

Constructor & Destructor Documentation

◆ Light() [1/2]

Saga::Light::Light ( )

Construct a new Light object. Should not be used.

◆ Light() [2/2]

Saga::Light::Light ( GraphicsEngine::LightType  type,
glm::vec3  lightData,
glm::vec3  lightColor = glm::vec3(1) 
)

Construct a new Light object of a certain type.

Parameters
typetype of the light. Can be GraphicsEngine::LightType::Directional or GraphicsEngine::LightType::Point
lightDataif the light is directional, this is the normalized direction vector. Otherwise, it is the position of the light.
lightColorcolor of the light, where (1,1,1) is white and (0,0,0) is black.

Member Function Documentation

◆ operator const std::shared_ptr< GraphicsEngine::Light > &()

Saga::Light::operator const std::shared_ptr< GraphicsEngine::Light > & ( ) const
inline

Member Data Documentation

◆ light

std::shared_ptr<GraphicsEngine::Light> Saga::Light::light

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