C:/Users/Mike/Documents/Visual Studio Projects/GameEngine/include/GraphicalComponent.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 Copyright (C) 2006 Michael Harnetty
00004 
00005 This program is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 -----------------------------------------------------------------------------
00019 */
00020 
00021 #ifndef GRAPHICAL_OBJECT_H
00022 #define GRAPHICAL_OBJECT_H
00023 
00024 #include "GameEnginePrerequisites.h"
00025 #include "GameObjectComponent.h"
00026 #include "Quaternion.h"
00027 #include "Vector3.h"
00028 
00029 namespace GameEngine {
00030 
00034         class ENGINE_DECL GraphicalComponent : public GameObjectComponent 
00035         {
00036         public:
00041                 GraphicalComponent(     Ogre::SceneNode* const rootNode );
00042                 
00049                 GraphicalComponent(     Ogre::SceneNode* const rootNode, Vector3& initialPos, Quaternion& initialOri );
00050 
00053                 virtual ~GraphicalComponent();
00054 
00055                 
00056                 
00061                 bool init();
00062                 
00065                 void destroy();
00066 
00067                 
00068                 
00074                 bool handleEvent(const Event& event);
00075                 
00080                 void update(const double& dt);
00081 
00082                 
00083                 
00088                 Ogre::SceneNode* const getParentNode() const { return mParentNode; }
00089                 
00094                 Ogre::Quaternion getOrientation() const { return  mSceneNode->getOrientation(); }
00095                 
00100                 Ogre::Vector3 getPosition() const { return mSceneNode->getPosition(); }
00101 
00102         protected:
00103                 Ogre::SceneNode* mSceneNode;
00104                 Ogre::SceneNode* mParentNode; // The objects parent scene node
00105                 Ogre::SceneManager* mSceneManager; // The objects scene manager (implicitly set from parent nodes creator)
00106 
00107                 Vector3 mInitialPos;
00108                 Quaternion mInitialOri;
00109         };
00110 
00111 }
00112 
00113 #endif

Generated on Thu Apr 19 09:47:02 2007 for GameEngine by  doxygen 1.5.2