Big 3D update (WIP)

Former-commit-id: 9f55dae0521bded91640a7ea2d223a49a378c97c
This commit is contained in:
Lynix
2013-03-02 01:29:44 +01:00
parent a20818d66b
commit ab1fc99fcd
17 changed files with 1446 additions and 77 deletions

View File

@@ -12,6 +12,8 @@
#include <Nazara/3D/SceneNode.hpp>
#include <Nazara/Core/Color.hpp>
class NzShader;
class NAZARA_API NzLight : public NzSceneNode
{
public:
@@ -19,9 +21,11 @@ class NAZARA_API NzLight : public NzSceneNode
NzLight(const NzLight& light);
~NzLight();
void Apply(unsigned int unit) const;
void AddToRenderQueue(NzRenderQueue& renderQueue) const;
const NzAxisAlignedBox& GetAABB() const;
void Apply(const NzShader* shader, unsigned int lightUnit) const;
const NzBoundingBoxf& GetBoundingBox() const;
NzColor GetAmbientColor() const;
float GetAttenuation() const;
NzColor GetDiffuseColor() const;
@@ -32,6 +36,8 @@ class NAZARA_API NzLight : public NzSceneNode
nzSceneNodeType GetSceneNodeType() const;
NzColor GetSpecularColor() const;
bool IsVisible(const NzFrustumf& frustum) const;
void SetAmbientColor(const NzColor& ambient);
void SetAttenuation(float attenuation);
void SetDiffuseColor(const NzColor& diffuse);
@@ -43,10 +49,16 @@ class NAZARA_API NzLight : public NzSceneNode
NzLight& operator=(const NzLight& light);
private:
void Register();
void Unregister();
void UpdateFrustum();
nzLightType m_type;
NzBoundingBoxf m_boundingBox;
NzColor m_ambientColor;
NzColor m_diffuseColor;
NzColor m_specularColor;
bool m_boundingBoxUpdated;
float m_attenuation;
float m_innerAngle;
float m_outerAngle;