All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ellipsoid.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_Ellipsoid_H_
25 #define _SkyX_VClouds_Ellipsoid_H_
26 
27 #include "Prerequisites.h"
28 
29 #include "VClouds/DataManager.h"
30 
31 namespace SkyX { namespace VClouds {
32 
39  {
40  public:
53  Ellipsoid(const int& a, const int& b, const int& c,
54  const int& nx, const int& ny, const int& nz,
55  const int& x, const int& y, const int& z,
56  const Ogre::Real& DynLibManager = 1.0f);
57 
60  ~Ellipsoid();
61 
67  void move(const int& Ax, const int& Ay, const int& Az);
68 
75  const Ogre::Vector3 getProbabilities(const int& x, const int& y,
76  const int& z) const;
77 
86  void updateProbabilities(DataManager::Cell ***c, const int &nx,
87  const int &ny, const int &nz, const bool& delayedResponse = true);
88 
92  bool isOutOfCells() const;
93 
97  inline const Ogre::Vector3 getDimensions() const
98  {
99  return Ogre::Vector3(mA, mB, mC);
100  }
101 
105  inline const Ogre::Vector3 getPosition() const
106  {
107  return Ogre::Vector3(mX, mY, mZ);
108  }
109 
113  void setDimensions(const Ogre::Vector3& Dimensions);
114 
118  inline void setPosition(const Ogre::Vector3& Position)
119  {
120  mX = Position.x;
121  mY = Position.y;
122  mZ = Position.z;
123  }
124 
125  private:
133  float _getLength(const int& x, const int& y, const int& z) const;
134 
136  int mA, mB, mC, mA2, mB2, mC2;
137 
139  int mNx, mNy, mNz;
140 
142  int mX, mY, mZ;
143 
145  Ogre::Real mDensity;
146  };
147 }}
148 
149 #endif
const Ogre::Vector3 getPosition() const
Get position.
Definition: Ellipsoid.h:105
const Ogre::Vector3 getDimensions() const
Get dimensions.
Definition: Ellipsoid.h:97
Cell struct.
Definition: DataManager.h:42
Ellipsoid class x^2 y^2 z^2 / + / + / = 1 a^2 b^2 c^2.
Definition: Ellipsoid.h:38
SkyX(Ogre::SceneManager *sm, Controller *c)
Contructor.
void setPosition(const Ogre::Vector3 &Position)
Set position.
Definition: Ellipsoid.h:118
#define DllExport
Include external headers.
Definition: Prerequisites.h:45