33#ifndef DVD_LIGHT_COMPONENT_INL_
34#define DVD_LIGHT_COMPONENT_INL_
58 inline void Light::setShadowVPMatrix(
const U8 index,
const mat4<F32>& newValue )
noexcept { assert( index < 6 ); _shadowProperties._lightVP[index].set( newValue ); _shadowProperties._dirty =
true; }
60 inline void Light::setShadowFloatValue(
const U8 index,
const F32 newValue )
noexcept { assert( index < 6 ); _shadowProperties._lightPosition[index].w = newValue; _shadowProperties._dirty =
true; }
62 inline void Light::setShadowLightPos(
const U8 index,
const vec3<F32>& newValue )
noexcept { _shadowProperties._lightPosition[index].xyz = newValue; _shadowProperties._dirty =
true; }
65 if ( getShadowArrayOffset() != offset )
67 _shadowProperties._lightDetails.y = offset ==
U16_MAX ? -1.f :
to_F32( offset );
68 _shadowProperties._dirty =
true;
75 staticShadowsDirty(
false );
76 dynamicShadowsDirty(
false );
ShadowProperties _shadowProperties
F32 distanceSquared(const vec3< F32 > &pos) const noexcept
Get the distance squared from this light to the specified position.
void setDiffuseColour(const UColour3 &newDiffuseColour) noexcept
const ShadowProperties & getShadowProperties() const noexcept
const LightType & getLightType() const noexcept
Get the light type. (see LightType enum)
const vec4< F32 > & getShadowLightPos(const U8 index) const noexcept
void toggleEnabled() noexcept
Light state (on/off)
void setShadowFloatValue(const U8 index, const F32 newValue) noexcept
void cleanShadowProperties() noexcept
void setShadowLightPos(const U8 index, const vec3< F32 > &newValue) noexcept
F32 getShadowFloatValues(const U8 index) const noexcept
void setShadowVPMatrix(const U8 index, const mat4< F32 > &newValue) noexcept
FColour3 getDiffuseColour() const noexcept
const mat4< F32 > & getShadowVPMatrix(const U8 index) const noexcept
void setShadowArrayOffset(const U16 offset) noexcept
U16 getShadowArrayOffset() const noexcept
UColour4 ToByteColour(const FColour4 &floatColour) noexcept
FColour4 ToFloatColour(const UColour4 &byteColour) noexcept
Handle console commands that start with a forward slash.
constexpr U16 to_U16(const T value)
constexpr F32 to_F32(const T value)
LightType
The different types of lights supported.
vec4< F32 > _lightDetails