KiCad PCB EDA Suite
CLIGHT Class Referenceabstract

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

#include <clight.h>

Inheritance diagram for CLIGHT:
CDIRECTIONALLIGHT CPOINTLIGHT

Public Member Functions

 CLIGHT ()
 
virtual ~CLIGHT ()
 
virtual void GetLightParameters (const SFVEC3F &aHitPoint, SFVEC3F &aOutVectorToLight, SFVEC3F &aOutLightColor, float &aOutDistance) const =0
 GetLightParameters - 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 37 of file clight.h.

Constructor & Destructor Documentation

◆ CLIGHT()

CLIGHT::CLIGHT ( )
inline

Definition at line 40 of file clight.h.

40 { m_castShadow = true; }
bool m_castShadow
Definition: clight.h:61

References m_castShadow.

◆ ~CLIGHT()

virtual CLIGHT::~CLIGHT ( )
inlinevirtual

Definition at line 42 of file clight.h.

42 {}

Member Function Documentation

◆ GetCastShadows()

bool CLIGHT::GetCastShadows ( ) const
inline

Definition at line 58 of file clight.h.

58 { return m_castShadow; }
bool m_castShadow
Definition: clight.h:61

References m_castShadow.

Referenced by C3D_RENDER_RAYTRACING::shadeHit().

◆ GetLightParameters()

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

GetLightParameters - 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 CDIRECTIONALLIGHT, and CPOINTLIGHT.

Referenced by C3D_RENDER_RAYTRACING::shadeHit().

◆ SetCastShadows()

void CLIGHT::SetCastShadows ( bool  aCastShadow)
inline

Definition at line 57 of file clight.h.

57 { m_castShadow = aCastShadow; }
bool m_castShadow
Definition: clight.h:61

References m_castShadow.

Referenced by C3D_RENDER_RAYTRACING::Reload().

Member Data Documentation

◆ m_castShadow

bool CLIGHT::m_castShadow
protected

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