Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::DirectionalLightComponent Struct Reference

Represents a directional (sun-like) light source. More...

#include <DirectionalLightComponent.h>

Public Member Functions

Crux::vec3 GetDirection () const
 Computes normalized light direction from azimuth/elevation.

Public Attributes

Crux::vec3 Color = {1.0f, 1.0f, 1.0f}
 Light color.
float Intensity = 1.0f
 Light intensity.
float Azimuth = 0.0f
 Horizontal rotation (0 = North, 180 = South).
float Elevation = 45.0f
 Vertical angle (0 = horizon, 90 = zenith).
bool CastsShadows = true
 Whether the light casts shadows.

Detailed Description

Represents a directional (sun-like) light source.

Member Function Documentation

◆ GetDirection()

Crux::vec3 Raven::DirectionalLightComponent::GetDirection ( ) const
inline

Computes normalized light direction from azimuth/elevation.

Returns
Normalized direction vector

Member Data Documentation

◆ Azimuth

float Raven::DirectionalLightComponent::Azimuth = 0.0f

Horizontal rotation (0 = North, 180 = South).

◆ CastsShadows

bool Raven::DirectionalLightComponent::CastsShadows = true

Whether the light casts shadows.

◆ Color

Crux::vec3 Raven::DirectionalLightComponent::Color = {1.0f, 1.0f, 1.0f}

Light color.

◆ Elevation

float Raven::DirectionalLightComponent::Elevation = 45.0f

Vertical angle (0 = horizon, 90 = zenith).

◆ Intensity

float Raven::DirectionalLightComponent::Intensity = 1.0f

Light intensity.


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