KiCad PCB EDA Suite
Loading...
Searching...
No Matches
POINT_LIGHT Class Reference

Point light source based on http://ogldev.atspace.co.uk/www/tutorial20/tutorial20.html. More...

#include <light.h>

Inheritance diagram for POINT_LIGHT:
LIGHT

Public Member Functions

 POINT_LIGHT (const SFVEC3F &aPos, const SFVEC3F &aColor)
 
void GetLightParameters (const SFVEC3F &aHitPoint, SFVEC3F &aOutVectorToLight, SFVEC3F &aOutLightColor, float &aOutDistance) const override
 Get parameters from this light.
 
void SetCastShadows (bool aCastShadow)
 
bool GetCastShadows () const
 

Protected Attributes

bool m_castShadow
 

Private Attributes

SFVEC3F m_position
 
SFVEC3F m_color
 
float m_att_constant
 
float m_att_linear
 
float m_att_exp
 

Detailed Description

Point light source based on http://ogldev.atspace.co.uk/www/tutorial20/tutorial20.html.

Definition at line 70 of file light.h.

Constructor & Destructor Documentation

◆ POINT_LIGHT()

POINT_LIGHT::POINT_LIGHT ( const SFVEC3F aPos,
const SFVEC3F aColor 
)
inline

Definition at line 73 of file light.h.

References m_att_constant, m_att_exp, m_att_linear, LIGHT::m_castShadow, m_color, and m_position.

Member Function Documentation

◆ GetCastShadows()

bool LIGHT::GetCastShadows ( ) const
inlineinherited

Definition at line 60 of file light.h.

References LIGHT::m_castShadow.

◆ GetLightParameters()

void POINT_LIGHT::GetLightParameters ( const SFVEC3F aHitPoint,
SFVEC3F aOutVectorToLight,
SFVEC3F aOutLightColor,
float &  aOutDistance 
) const
inlineoverridevirtual

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

Implements LIGHT.

Definition at line 84 of file light.h.

References m_att_constant, m_att_exp, m_att_linear, m_color, and m_position.

◆ SetCastShadows()

void LIGHT::SetCastShadows ( bool  aCastShadow)
inlineinherited

Definition at line 59 of file light.h.

References LIGHT::m_castShadow.

Referenced by RENDER_3D_RAYTRACE_BASE::Reload().

Member Data Documentation

◆ m_att_constant

float POINT_LIGHT::m_att_constant
private

Definition at line 106 of file light.h.

Referenced by GetLightParameters(), and POINT_LIGHT().

◆ m_att_exp

float POINT_LIGHT::m_att_exp
private

Definition at line 108 of file light.h.

Referenced by GetLightParameters(), and POINT_LIGHT().

◆ m_att_linear

float POINT_LIGHT::m_att_linear
private

Definition at line 107 of file light.h.

Referenced by GetLightParameters(), and POINT_LIGHT().

◆ m_castShadow

bool LIGHT::m_castShadow
protectedinherited

◆ m_color

SFVEC3F POINT_LIGHT::m_color
private

Definition at line 104 of file light.h.

Referenced by GetLightParameters(), and POINT_LIGHT().

◆ m_position

SFVEC3F POINT_LIGHT::m_position
private

Definition at line 103 of file light.h.

Referenced by GetLightParameters(), and POINT_LIGHT().


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