Hymn to Beauty
C++ 3D Engine
Component::SpotLight Class Reference

Component describing a spot light. More...

#include <SpotLight.hpp>

Inheritance diagram for Component::SpotLight:
Component::SuperComponent

Public Member Functions

 SpotLight ()
 Create new spot light. More...
 
void Serialize (Json::Value &node, bool load) override
 Save or load component values to/from JSON. More...
 
- Public Member Functions inherited from Component::SuperComponent
 SuperComponent ()
 Create new SuperComponent. More...
 
virtual ~SuperComponent ()
 Destructor. More...
 
void Kill ()
 Kill the component, will be removed at the end of the frame. More...
 
bool IsKilled () const
 Get whether component has been killed. More...
 

Public Attributes

glm::vec3 color = glm::vec3(1.0f, 1.0f, 1.0f)
 Color. More...
 
float attenuation = 1.0f
 Attenuation. More...
 
float intensity = 1.0f
 Intensity. More...
 
float coneAngle = 15.0f
 Angle of the cone (in degrees). More...
 
float distance = 1.0f
 Distance. More...
 
- Public Attributes inherited from Component::SuperComponent
Entityentity = nullptr
 Pointer to which entity this component corresponds. More...
 

Detailed Description

Component describing a spot light.

Constructor & Destructor Documentation

◆ SpotLight()

SpotLight::SpotLight ( )

Create new spot light.

Member Function Documentation

◆ Serialize()

void SpotLight::Serialize ( Json::Value &  node,
bool  load 
)
overridevirtual

Save or load component values to/from JSON.

Parameters
nodeThe JSON node to save to or load from.
loadWhether to load (otherwise saves).

Implements Component::SuperComponent.

Member Data Documentation

◆ attenuation

float Component::SpotLight::attenuation = 1.0f

Attenuation.

◆ color

glm::vec3 Component::SpotLight::color = glm::vec3(1.0f, 1.0f, 1.0f)

Color.

◆ coneAngle

float Component::SpotLight::coneAngle = 15.0f

Angle of the cone (in degrees).

◆ distance

float Component::SpotLight::distance = 1.0f

Distance.

◆ intensity

float Component::SpotLight::intensity = 1.0f

Intensity.


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