All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GeometryManager.h
Go to the documentation of this file.
1 /*
2 --------------------------------------------------------------------------------
3 This source file is part of SkyX.
4 Visit http://www.paradise-studios.net/products/skyx/
5 
6 Copyright (C) 2009-2012 Xavier Verguín González <xavyiy@gmail.com>
7 
8 This program is free software; you can redistribute it and/or modify it under
9 the terms of the GNU Lesser General Public License as published by the Free Software
10 Foundation; either version 2 of the License, or (at your option) any later
11 version.
12 
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License along with
18 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20 http://www.gnu.org/copyleft/lesser.txt.
21 --------------------------------------------------------------------------------
22 */
23 
24 #ifndef _SkyX_VClouds_GeometryManager_H_
25 #define _SkyX_VClouds_GeometryManager_H_
26 
27 #include <vector>
28 #include "Prerequisites.h"
29 
30 #include "VClouds/GeometryBlock.h"
31 
32 namespace SkyX { namespace VClouds {
33 
34  class VClouds;
35 
37  {
38  public:
43 
46  ~GeometryManager();
47 
58  void create(const Ogre::Vector2& Height, const float& Radius,
59  const Ogre::Radian& Alpha, const Ogre::Radian& Beta,
60  const int& NumberOfBlocks, const int& Na, const int& Nb,
61  const int& Nc);
62 
65  void remove();
66 
70  void update(const Ogre::Real& timeSinceLastFrame);
71 
76  void updateGeometry(Ogre::Camera* c,
77  const Ogre::Real& timeSinceLastCameraFrame);
78 
82  inline const bool& isCreated() const
83  {
84  return mCreated;
85  }
86 
90  inline Ogre::SceneNode* getSceneNode()
91  {
92  return mSceneNode;
93  }
94 
99  void _setMaterialName(const Ogre::String& mn);
100 
105  void _updateRenderQueueGroup(const Ogre::uint8& rqg);
106 
107  private:
110  void _createGeometry();
111 
116  void _updateGeometry(Ogre::Camera* c, const Ogre::Real& timeSinceLastFrame);
117 
119  VClouds *mVClouds;
120 
122  bool mCreated;
123 
126  Ogre::Vector2 mHeight;
127 
129  float mRadius;
130 
132  Ogre::Radian mAlpha, mBeta;
133 
135  Ogre::Radian mPhi;
136 
138  int mNumberOfBlocks;
139 
141  int mNa, mNb, mNc;
142 
144  float mA, mB, mC;
145 
147  Ogre::Vector2 mWorldOffset;
148 
150  std::vector<GeometryBlock*> mGeometryBlocks;
151 
153  Ogre::SceneNode *mSceneNode;
154  };
155 }}
156 
157 #endif
Ogre::SceneNode * getSceneNode()
Get scene node.
Definition: GeometryManager.h:90
Definition: VClouds.h:37
void create()
Create SkyX.
const bool & isCreated() const
Has been create() already called?
Definition: GeometryManager.h:82
Definition: GeometryManager.h:36
SkyX(Ogre::SceneManager *sm, Controller *c)
Contructor.
bool mCreated
Is SkyX created?
Definition: SkyX.h:422
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.
#define DllExport
Include external headers.
Definition: Prerequisites.h:45