Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

Godrays: Safety commit. 90017 N8

File size: 2.6 KB
RevLine 
[8435]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 
[8557]33 @brief Header of the GodrayShader class.
[8435]34*/
35
36
[8557]37#ifndef _GodrayShader_H__
38#define _GodrayShader_H__
[8435]39
40#include "OrxonoxPrereqs.h"
41
[8557]42#include <OgreCompositorInstance.h>
43
[8435]44#include "tools/interfaces/Tickable.h"
45#include "core/BaseObject.h"
[8497]46#include "util/Math.h"
[8557]47#include "WorldEntity.h"
[8435]48#include "GlobalShader.h"
49
50
51namespace orxonox
52{
53    /**
54     @brief
55     
56    */
[8557]57    class _OrxonoxExport GodrayShader : public BaseObject, public Tickable
[8435]58    {
[8491]59        public:
[8557]60            GodrayShader(BaseObject* creator);
61            virtual ~GodrayShader();
[8491]62           
63            virtual void tick(float dt);
[8557]64       
65            virtual void updateParameters();
[8491]66           
67            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[8435]68       
[8491]69            virtual void changedVisibility();
[8557]70       
71            void setWorldEntity(WorldEntity* worldEntity);
[8491]72           
73            inline const GlobalShader& getGlobalShader() const
74            { return this->globalShader_; }
[8435]75       
[8491]76            void setSunPosition(const Vector3& position);
[8557]77            void setSunColor(const ColourValue& color);
[8497]78            void setSkyColor(const ColourValue& color);
[8491]79            const Vector3& getSunPosition() const;
[8557]80            const ColourValue& getSunColor() const;
[8497]81            const ColourValue& getSkyColor() const;
[8435]82       
[8491]83        private:
[8557]84       
85            WorldEntity* worldEntity_;
[8491]86            GlobalShader globalShader_;
[8557]87            Ogre::CompositorInstance* compositor_;
[8491]88            Vector3 sunPosition_;
[8557]89            ColourValue sunColor_;
[8497]90            ColourValue skyColor_;
[8491]91            float exposure_;
92            float decay_;
93            float density_;
[8435]94    };
95}
96
[8557]97#endif /* _GodrayShader_H__ */
Note: See TracBrowser for help on using the repository browser.