Overload  1.1
Game engine with editor
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
OvRendering::Entities::Light Struct Reference

#include <Light.h>

Public Types

enum  Type {
  Type::POINT, Type::DIRECTIONAL, Type::SPOT, Type::AMBIENT_BOX,
  Type::AMBIENT_SPHERE
}
 

Public Member Functions

 Light (OvMaths::FTransform &p_tranform, Type p_type)
 
OvMaths::FMatrix4 GenerateMatrix () const
 
float GetEffectRange () const
 
const OvMaths::FTransformGetTransform () const
 

Public Attributes

OvMaths::FVector3 color = { 1.f, 1.f, 1.f }
 
float intensity = 1.f
 
float constant = 0.0f
 
float linear = 0.0f
 
float quadratic = 1.0f
 
float cutoff = 12.f
 
float outerCutoff = 15.f
 
float type = 0.0f
 

Protected Attributes

OvMaths::FTransformm_transform
 

Detailed Description

Data structure that can represent any type of light

Member Enumeration Documentation

◆ Type

Light types

Enumerator
POINT 
DIRECTIONAL 
SPOT 
AMBIENT_BOX 
AMBIENT_SPHERE 

Constructor & Destructor Documentation

◆ Light()

OvRendering::Entities::Light::Light ( OvMaths::FTransform p_tranform,
Type  p_type 
)

Create the light with the given transform and type

Parameters
p_transform
p_type

Member Function Documentation

◆ GenerateMatrix()

OvMaths::FMatrix4 OvRendering::Entities::Light::GenerateMatrix ( ) const

Generate the light matrix, ready to send to the GPU

◆ GetEffectRange()

float OvRendering::Entities::Light::GetEffectRange ( ) const

Calculate the light effect range from the quadratic falloff equation

◆ GetTransform()

const OvMaths::FTransform & OvRendering::Entities::Light::GetTransform ( ) const

Returns the light transform

Member Data Documentation

◆ color

OvMaths::FVector3 OvRendering::Entities::Light::color = { 1.f, 1.f, 1.f }

◆ constant

float OvRendering::Entities::Light::constant = 0.0f

◆ cutoff

float OvRendering::Entities::Light::cutoff = 12.f

◆ intensity

float OvRendering::Entities::Light::intensity = 1.f

◆ linear

float OvRendering::Entities::Light::linear = 0.0f

◆ m_transform

OvMaths::FTransform& OvRendering::Entities::Light::m_transform
protected

◆ outerCutoff

float OvRendering::Entities::Light::outerCutoff = 15.f

◆ quadratic

float OvRendering::Entities::Light::quadratic = 1.0f

◆ type

float OvRendering::Entities::Light::type = 0.0f

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