GameEngine::GraphicalComponent Class Reference

#include <GraphicalComponent.h>

Inheritance diagram for GameEngine::GraphicalComponent:

Inheritance graph
[legend]
Collaboration diagram for GameEngine::GraphicalComponent:

Collaboration graph
[legend]
List of all members.

Detailed Description

A GraphicalComponent is the graphical representation of a game object, drawn on screen by the renderer

Definition at line 34 of file GraphicalComponent.h.

Public Member Functions

 GraphicalComponent (Ogre::SceneNode *const rootNode)
 GraphicalComponent (Ogre::SceneNode *const rootNode, Vector3 &initialPos, Quaternion &initialOri)
virtual ~GraphicalComponent ()
bool init ()
void destroy ()
bool handleEvent (const Event &event)
void update (const double &dt)
Ogre::SceneNode *const getParentNode () const
Ogre::Quaternion getOrientation () const
Ogre::Vector3 getPosition () const

Protected Attributes

Ogre::SceneNode * mSceneNode
Ogre::SceneNode * mParentNode
Ogre::SceneManager * mSceneManager
Vector3 mInitialPos
Quaternion mInitialOri


Constructor & Destructor Documentation

GameEngine::GraphicalComponent::GraphicalComponent ( Ogre::SceneNode *const   rootNode  ) 

Constructor. Create a graphical component, using default initial position and orientation

Parameters:
rootNode The scene node this component is a child of

Definition at line 27 of file GraphicalComponent.cpp.

GameEngine::GraphicalComponent::GraphicalComponent ( Ogre::SceneNode *const   rootNode,
Vector3 initialPos,
Quaternion initialOri 
)

Constructor. Create a graphical component, with specified position and orientation

Parameters:
rootNode The scene node this component is a child of
initialPos The initial position of the component
initialOri The initial orientation of the component

Definition at line 34 of file GraphicalComponent.cpp.

GameEngine::GraphicalComponent::~GraphicalComponent (  )  [virtual]

Destructor

Definition at line 44 of file GraphicalComponent.cpp.


Member Function Documentation

bool GameEngine::GraphicalComponent::init (  )  [virtual]

Initialise the component

Returns:
true of initialisation was successfull, false otherwise

Reimplemented from GameEngine::GameObjectComponent.

Definition at line 49 of file GraphicalComponent.cpp.

void GameEngine::GraphicalComponent::destroy (  )  [virtual]

Destroy the component

Reimplemented from GameEngine::GameObjectComponent.

Definition at line 66 of file GraphicalComponent.cpp.

bool GameEngine::GraphicalComponent::handleEvent ( const Event event  )  [virtual]

Handle events which component has registered to listen for

Parameters:
event The event to handle
Returns:
true if the event was consumed, false otherwise

Implements GameEngine::IEventListener.

Definition at line 80 of file GraphicalComponent.cpp.

void GameEngine::GraphicalComponent::update ( const double &  dt  )  [virtual]

Update the component

Parameters:
dt Time since last frame

Reimplemented from GameEngine::Process.

Definition at line 97 of file GraphicalComponent.cpp.

Ogre::SceneNode* const GameEngine::GraphicalComponent::getParentNode (  )  const [inline]

Get the components parent scene node

Returns:
The objects parent scene node

Definition at line 88 of file GraphicalComponent.h.

Ogre::Quaternion GameEngine::GraphicalComponent::getOrientation (  )  const [inline]

Get the components current orientation

Returns:
The objects orientation as a quaternion

Definition at line 94 of file GraphicalComponent.h.

Ogre::Vector3 GameEngine::GraphicalComponent::getPosition (  )  const [inline]

Get the components current position

Returns:
A vector representing the objects position

Definition at line 100 of file GraphicalComponent.h.


Member Data Documentation

Ogre::SceneNode* GameEngine::GraphicalComponent::mSceneNode [protected]

Definition at line 103 of file GraphicalComponent.h.

Ogre::SceneNode* GameEngine::GraphicalComponent::mParentNode [protected]

Definition at line 104 of file GraphicalComponent.h.

Ogre::SceneManager* GameEngine::GraphicalComponent::mSceneManager [protected]

Definition at line 105 of file GraphicalComponent.h.

Vector3 GameEngine::GraphicalComponent::mInitialPos [protected]

Definition at line 107 of file GraphicalComponent.h.

Quaternion GameEngine::GraphicalComponent::mInitialOri [protected]

Definition at line 108 of file GraphicalComponent.h.


The documentation for this class was generated from the following files:
Generated on Thu Apr 19 09:48:50 2007 for GameEngine by  doxygen 1.5.2