KiCad PCB EDA Suite
LIGHT Class Referenceabstract

A base light class to derive to implement other light classes. More...

#include <light.h>

Inheritance diagram for LIGHT:
DIRECTIONAL_LIGHT POINT_LIGHT

Public Member Functions

 LIGHT ()
 
virtual ~LIGHT ()
 
virtual void GetLightParameters (const SFVEC3F &aHitPoint, SFVEC3F &aOutVectorToLight, SFVEC3F &aOutLightColor, float &aOutDistance) const =0
 Get parameters from this light. More...
 
void SetCastShadows (bool aCastShadow)
 
bool GetCastShadows () const
 

Protected Attributes

bool m_castShadow
 

Detailed Description

A base light class to derive to implement other light classes.

Definition at line 40 of file light.h.

Constructor & Destructor Documentation

◆ LIGHT()

LIGHT::LIGHT ( )
inline

Definition at line 43 of file light.h.

43 { m_castShadow = true; }
bool m_castShadow
Definition: light.h:63

References m_castShadow.

◆ ~LIGHT()

virtual LIGHT::~LIGHT ( )
inlinevirtual

Definition at line 45 of file light.h.

45 {}

Member Function Documentation

◆ GetCastShadows()

bool LIGHT::GetCastShadows ( ) const
inline

Definition at line 60 of file light.h.

60 { return m_castShadow; }
bool m_castShadow
Definition: light.h:63

References m_castShadow.

◆ GetLightParameters()

virtual void LIGHT::GetLightParameters ( const SFVEC3F aHitPoint,
SFVEC3F aOutVectorToLight,
SFVEC3F aOutLightColor,
float &  aOutDistance 
) const
pure virtual

Get parameters from this light.

Parameters
aHitPointinput hit position
aOutVectorToLighta vector that points from the hit position in direction to the light
aOutLightColorthe color of this light
aOutDistancethe distance from the point to the light

Implemented in DIRECTIONAL_LIGHT, and POINT_LIGHT.

◆ SetCastShadows()

void LIGHT::SetCastShadows ( bool  aCastShadow)
inline

Definition at line 59 of file light.h.

59 { m_castShadow = aCastShadow; }
bool m_castShadow
Definition: light.h:63

References m_castShadow.

Referenced by RENDER_3D_RAYTRACE::Reload().

Member Data Documentation

◆ m_castShadow

bool LIGHT::m_castShadow
protected

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