Sion Tower (demo técnica) 0.1

/home/david/programacion/iberogre-siontower/siontower/trunk/src/include/gameObject.h

00001 /*
00002  * This file is part of SionTower.
00003  *
00004  * 
00005  * David Saltares Márquez (C) 2011
00006  * <david.saltares@gmail.com>
00007  *
00008  * 
00009  * SionTower examples are free software: you can redistribute it and/or
00010  * modify it under the terms of the GNU General Public License ad
00011  * published by the Free Software Foundation, either version 3 of the
00012  * License, or (at your option) ant later version.
00013  *
00014  * SionTower examples are distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with SionTower examples.  If not, see <http://www.gnu.org/licenses/>.
00021  */
00022 
00023 
00024 #ifndef SIONTOWER_TRUNK_SRC_INCLUDE_GAMEOBJECT_H_
00025 #define SIONTOWER_TRUNK_SRC_INCLUDE_GAMEOBJECT_H_
00026 
00027 #include <vector>
00028 
00029 #include <OGRE/Ogre.h>
00030 
00031 #include "shape.h"
00032 
00033 class Body;
00034 
00036 
00055 class GameObject {
00056     public:
00063         GameObject(Ogre::SceneManager* sceneManager);
00064 
00075         GameObject(Ogre::SceneManager* sceneManager,
00076                    const Ogre::String& entityName,
00077                    const Ogre::String& entityFile,
00078                    const Ogre::String& nodeName);
00079         
00087         GameObject(Ogre::SceneManager* sceneManager,
00088                    Ogre::SceneNode* sceneNode,
00089                    Ogre::Entity* entity);
00090 
00098         virtual ~GameObject();
00099         
00103         Body* getBody();
00104 
00113         void setBody(Body* body);
00114 
00119         Ogre::SceneNode* getSceneNode();
00120 
00124         const Ogre::Vector3& getPosition();
00125 
00129         void setPosition(const Ogre::Vector3& position);
00130         
00134         const Ogre::Vector3& getScale();
00135 
00139         void setScale(const Ogre::Vector3& scale);
00140 
00144         const Ogre::Quaternion& getOrientation();
00145 
00149         void setOrientation(const Ogre::Quaternion& orientation);
00150 
00158         virtual void update(Ogre::Real deltaT);
00159 
00165         void synchronizeBody();
00166 
00172         void synchronizeSceneNode();
00173     protected:
00174         Ogre::SceneManager* _sceneManager;
00175         Ogre::SceneNode* _node;
00176         Ogre::Entity* _entity;
00177         Body* _body;
00178         std::vector<Shape*> _shapes;
00179 };
00180 
00181 #endif  // SIONTOWER_TRUNK_SRC_INCLUDE_GAMEOBJECT_H_
 Todo Clases Archivos Funciones 'typedefs' Enumeraciones