-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathAmbientLight.h
49 lines (37 loc) · 1.41 KB
/
AmbientLight.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2006 Torus Knot Software Ltd
Also see acknowledgements in Readme.html
You may use this sample code for anything you like, it is not covered by the
LGPL like the rest of the engine.
-----------------------------------------------------------------------------
*/
#ifndef _AMBIENTLIGHT_H
#define _AMBIENTLIGHT_H
#include "OgreSimpleRenderable.h"
// Renderable for rendering Ambient component and also to
// establish the depths
// Just instantiation is sufficient
// Note that instantiation is necessary to at least establish the depths
// even if the current ambient colour is 0
// its ambient colour is same as the scene's ambient colour
// XXX Could make this a singleton/make it private to the DeferredShadingSystem e.g.
class AmbientLight : public Ogre::SimpleRenderable
{
public:
AmbientLight();
~AmbientLight();
/** @copydoc MovableObject::getBoundingRadius */
virtual Ogre::Real getBoundingRadius(void) const;
/** @copydoc Renderable::getSquaredViewDepth */
virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera*) const;
/** @copydoc Renderable::getMaterial */
virtual const Ogre::MaterialPtr& getMaterial(void) const;
protected:
Ogre::Real mRadius;
Ogre::MaterialPtr mMatPtr;
};
#endif