
Added "Controlled" mesh classes Added Global Lighting Class Added Gamepad controls Split terrain nodes into Height and Perlin classes Fixed Splitmesh node stuff
38 lines
811 B
C++
38 lines
811 B
C++
#include "GlobalLighting.h"
|
|
|
|
GlobalLighting::GlobalLighting()
|
|
{
|
|
_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;
|
|
} |