KiCad PCB EDA Suite
|
A light source based only on a directional vector. More...
#include <light.h>
Public Member Functions | |
DIRECTIONAL_LIGHT (const SFVEC3F &aDir, const SFVEC3F &aColor) | |
void | SetDirection (const SFVEC3F &aDir) |
Set directional light orientation. | |
void | GetLightParameters (const SFVEC3F &, 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_inv_direction |
opposite direction of the light | |
SFVEC3F | m_color |
light color | |
Definition at line 118 of file light.h.
References LIGHT::m_castShadow, m_color, and m_inv_direction.
|
inlineinherited |
Definition at line 60 of file light.h.
References LIGHT::m_castShadow.
|
inlineoverridevirtual |
Get parameters from this light.
aHitPoint | input hit position |
aOutVectorToLight | a vector that points from the hit position in direction to the light |
aOutLightColor | the color of this light |
aOutDistance | the distance from the point to the light |
Implements LIGHT.
Definition at line 134 of file light.h.
References m_color, and m_inv_direction.
|
inlineinherited |
Definition at line 59 of file light.h.
References LIGHT::m_castShadow.
Referenced by RENDER_3D_RAYTRACE_BASE::Reload().
|
inline |
Set directional light orientation.
aDir | is the vector defining the direction of the light source. |
Definition at line 131 of file light.h.
References m_inv_direction.
Referenced by RENDER_3D_RAYTRACE_GL::Redraw(), RENDER_3D_RAYTRACE_RAM::Redraw(), and RENDER_3D_RAYTRACE_BASE::render().
|
protectedinherited |
Definition at line 63 of file light.h.
Referenced by DIRECTIONAL_LIGHT(), LIGHT::GetCastShadows(), LIGHT::LIGHT(), POINT_LIGHT::POINT_LIGHT(), and LIGHT::SetCastShadows().
|
private |
light color
Definition at line 144 of file light.h.
Referenced by DIRECTIONAL_LIGHT(), and GetLightParameters().
|
private |
opposite direction of the light
Definition at line 143 of file light.h.
Referenced by DIRECTIONAL_LIGHT(), GetLightParameters(), and SetDirection().