Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
MoonManager.h
Go to the documentation of this file.
1/*
2--------------------------------------------------------------------------------
3This source file is part of SkyX.
4Visit http://www.paradise-studios.net/products/skyx/
5
6Copyright (C) 2009-2012 Xavier Vergu�n Gonz�lez <xavyiy@gmail.com>
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt.
21--------------------------------------------------------------------------------
22*/
23
24#ifndef _SkyX_MoonManager_H_
25#define _SkyX_MoonManager_H_
26
27#include "Prerequisites.h"
28
29namespace SkyX
30{
31 class SkyX;
32
34 {
35 public:
39 MoonManager(SkyX *s);
40
44
47 void create();
48
51 void remove();
52
56 void updateMoonPhase(const Ogre::Real& phase);
57
61 void updateGeometry(Ogre::Camera* c);
62
66 inline Ogre::BillboardSet* getMoonBillboard()
67 {
68 return mMoonBillboard;
69 }
70
74 inline Ogre::SceneNode* getMoonSceneNode()
75 {
76 return mMoonSceneNode;
77 }
78
82 inline void setMoonSize(const Ogre::Real& MoonSize)
83 {
84 mMoonSize = MoonSize;
85 }
86
90 inline const Ogre::Real& getMoonSize() const
91 {
92 return mMoonSize;
93 }
94
98 inline void setMoonHaloIntensity(const Ogre::Real& MoonHaloIntensity)
99 {
100 mMoonHaloIntensity = MoonHaloIntensity;
101 }
102
106 inline const Ogre::Real& getMoonHaloIntensity() const
107 {
108 return mMoonHaloIntensity;
109 }
110
114 inline void setMoonHaloStrength(const Ogre::Real& MoonHaloStrength)
115 {
116 mMoonHaloStrength = MoonHaloStrength;
117 }
118
122 inline const Ogre::Real& getMoonHaloStrength() const
123 {
124 return mMoonHaloStrength;
125 }
126
130 inline const bool& isCreated() const
131 {
132 return mCreated;
133 }
134
135 private:
139 void _updateMoonBounds(Ogre::Camera* c);
140
142 Ogre::BillboardSet* mMoonBillboard;
144 Ogre::SceneNode* mMoonSceneNode;
145
148
150 Ogre::Real mMoonSize;
155
157 Ogre::MaterialPtr mMoonMaterial;
158
161 };
162}
163
164#endif
Ogre::Real mMoonHaloIntensity
Moon halo intensity.
void updateMoonPhase(const Ogre::Real &phase)
Update moon phase.
void create()
Create all resources.
void setMoonHaloIntensity(const Ogre::Real &MoonHaloIntensity)
Set moon halo intensity.
Definition MoonManager.h:98
void remove()
Remove all resources.
const bool & isCreated() const
Is moon manager created?
~MoonManager()
Destructor.
Ogre::Real mMoonSize
Moon size.
Ogre::BillboardSet * mMoonBillboard
Moon billboard.
void updateGeometry(Ogre::Camera *c)
Update geometry.
Ogre::MaterialPtr mMoonMaterial
Moon material.
void _updateMoonBounds(Ogre::Camera *c)
Update moon bounds.
void setMoonHaloStrength(const Ogre::Real &MoonHaloStrength)
Set moon halo strength.
Ogre::Real mMoonHaloStrength
Moon halo strength.
const Ogre::Real & getMoonHaloIntensity() const
Get moon halo intensity.
Ogre::SceneNode * getMoonSceneNode()
Get moon scene node.
Definition MoonManager.h:74
bool mCreated
Is moon manager created?
const Ogre::Real & getMoonSize() const
Get moon size.
Definition MoonManager.h:90
void setMoonSize(const Ogre::Real &MoonSize)
Set moon size.
Definition MoonManager.h:82
SkyX * mSkyX
SkyX parent pointer.
const Ogre::Real & getMoonHaloStrength() const
Get moon halo strength.
Ogre::BillboardSet * getMoonBillboard()
Get moon billboard.
Definition MoonManager.h:66
Ogre::SceneNode * mMoonSceneNode
Moon scene node.