Files
directx-plane-game/Graphics2/GlobalLighting.cpp
iDunnoDev 616f68bf8b Added Comments
Added ability to hold shift and skip the terrain generation when loading
Added ability for the perlin terrain to save a raw image of the terrain to use as a cache
2022-06-13 16:41:25 +01:00

39 lines
845 B
C++

#include "GlobalLighting.h"
GlobalLighting::GlobalLighting()
{
// Set the default lighting to 0
_ambientLight = XMFLOAT4(0.0f, 0.0f, 0.0f, 0.0f);
_directionalLightVector = XMVectorSet(0.0f, 0.0f, 0.0f, 0.0f);
_directionalLightColor = XMFLOAT4(0.0f, 0.0f, 0.0f, 0.0f);
}
GlobalLighting::~GlobalLighting()
{
}
void GlobalLighting::SetAmbientLight(XMFLOAT4 ambientLight)
{
_ambientLight = ambientLight;
}
XMFLOAT4 GlobalLighting::GetAmbientLight() const
{
return _ambientLight;
}
void GlobalLighting::SetDirectionalLight(FXMVECTOR direction, XMFLOAT4 lightColor)
{
_directionalLightVector = direction;
_directionalLightColor = lightColor;
}
XMVECTOR GlobalLighting::GetDirectionalLightDirection() const
{
return _directionalLightVector;
}
XMFLOAT4 GlobalLighting::GetDirectionalLightColor() const
{
return _directionalLightColor;
}