Files
NazaraEngine/include/Nazara/Graphics/Light.inl
Lynix eaf1bb3601 Merge branch 'NDK-Refactor' into NDK
Conflicts:
	examples/HardwareInfo/main.cpp
	include/Nazara/Renderer/Enums.hpp
	include/Nazara/Renderer/GpuQuery.hpp
	include/Nazara/Renderer/OpenGL.hpp
	include/Nazara/Renderer/RenderBuffer.hpp
	include/Nazara/Renderer/RenderTexture.hpp
	include/Nazara/Renderer/Texture.hpp
	src/Nazara/Graphics/AbstractRenderTechnique.cpp
	src/Nazara/Graphics/DeferredRenderTechnique.cpp
	src/Nazara/Graphics/Material.cpp
	src/Nazara/Graphics/SkyboxBackground.cpp
	src/Nazara/Renderer/GpuQuery.cpp
	src/Nazara/Renderer/OpenGL.cpp
	src/Nazara/Renderer/RenderBuffer.cpp
	src/Nazara/Renderer/RenderTexture.cpp
	src/Nazara/Renderer/Renderer.cpp
	src/Nazara/Renderer/Shader.cpp
	src/Nazara/Renderer/ShaderStage.cpp
	src/Nazara/Renderer/Texture.cpp

Former-commit-id: 2f1c7e9f9766f59ab83d9405856a1898ac4ab48f
2015-09-25 23:16:58 +02:00

111 lines
1.9 KiB
C++

// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Graphics module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <memory>
#include <Nazara/Renderer/Debug.hpp>
namespace Nz
{
inline float Light::GetAmbientFactor() const
{
return m_ambientFactor;
}
inline float Light::GetAttenuation() const
{
return m_attenuation;
}
inline Color Light::GetColor() const
{
return m_color;
}
inline float Light::GetDiffuseFactor() const
{
return m_diffuseFactor;
}
inline float Light::GetInnerAngle() const
{
return m_innerAngle;
}
inline LightType Light::GetLightType() const
{
return m_type;
}
inline float Light::GetOuterAngle() const
{
return m_outerAngle;
}
inline float Light::GetOuterAngleCosine() const
{
return m_outerAngleCosine;
}
inline float Light::GetOuterAngleTangent() const
{
return m_outerAngleTangent;
}
inline float Light::GetRadius() const
{
return m_radius;
}
inline void Light::SetAmbientFactor(float factor)
{
m_ambientFactor = factor;
}
inline void Light::SetAttenuation(float attenuation)
{
m_attenuation = attenuation;
}
inline void Light::SetColor(const Color& color)
{
m_color = color;
}
inline void Light::SetDiffuseFactor(float factor)
{
m_diffuseFactor = factor;
}
inline void Light::SetInnerAngle(float innerAngle)
{
m_innerAngle = innerAngle;
m_innerAngleCosine = std::cos(DegreeToRadian(m_innerAngle));
}
inline void Light::SetLightType(LightType type)
{
m_type = type;
}
inline void Light::SetOuterAngle(float outerAngle)
{
m_outerAngle = outerAngle;
m_outerAngleCosine = std::cos(DegreeToRadian(m_outerAngle));
m_outerAngleTangent = std::tan(DegreeToRadian(m_outerAngle));
InvalidateBoundingVolume();
}
inline void Light::SetRadius(float radius)
{
m_radius = radius;
m_invRadius = 1.f / m_radius;
InvalidateBoundingVolume();
}
}
#include <Nazara/Renderer/DebugOff.hpp>