Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/environment2/src/orxonox/graphics/GodrayShader.h @ 8557

Last change on this file since 8557 was 8557, checked in by marwegma, 13 years ago

Godrays: Safety commit. 90017 N8

File size: 2.6 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Markus 'atok' Wegmann
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29
30/**
31 @file
32 
33 @brief Header of the GodrayShader class.
34*/
35
36
37#ifndef _GodrayShader_H__
38#define _GodrayShader_H__
39
40#include "OrxonoxPrereqs.h"
41
42#include <OgreCompositorInstance.h>
43
44#include "tools/interfaces/Tickable.h"
45#include "core/BaseObject.h"
46#include "util/Math.h"
47#include "WorldEntity.h"
48#include "GlobalShader.h"
49
50
51namespace orxonox
52{
53    /**
54     @brief
55     
56    */
57    class _OrxonoxExport GodrayShader : public BaseObject, public Tickable
58    {
59        public:
60            GodrayShader(BaseObject* creator);
61            virtual ~GodrayShader();
62           
63            virtual void tick(float dt);
64       
65            virtual void updateParameters();
66           
67            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
68       
69            virtual void changedVisibility();
70       
71            void setWorldEntity(WorldEntity* worldEntity);
72           
73            inline const GlobalShader& getGlobalShader() const
74            { return this->globalShader_; }
75       
76            void setSunPosition(const Vector3& position);
77            void setSunColor(const ColourValue& color);
78            void setSkyColor(const ColourValue& color);
79            const Vector3& getSunPosition() const;
80            const ColourValue& getSunColor() const;
81            const ColourValue& getSkyColor() const;
82       
83        private:
84       
85            WorldEntity* worldEntity_;
86            GlobalShader globalShader_;
87            Ogre::CompositorInstance* compositor_;
88            Vector3 sunPosition_;
89            ColourValue sunColor_;
90            ColourValue skyColor_;
91            float exposure_;
92            float decay_;
93            float density_;
94    };
95}
96
97#endif /* _GodrayShader_H__ */
Note: See TracBrowser for help on using the repository browser.