#include <Actor.hpp>
Public Member Functions | |
void | update () |
Update the actor. | |
const std::string & | getName () const |
Get actor name. | |
bool | setModel (const std::string &name) |
Set model to use for this actor. | |
const Ogre::Vector3 | getScale () const |
Get scale. | |
void | setScale (const Ogre::Vector3 &scale) |
Set scale. | |
const bool | getPhysicsState () const |
Retrieve whether the actor is included in the physical simulation or not. | |
const float | getPhysicsMass () const |
Get the mass of the actor. | |
void | setPhysicsProperties (const bool affected, const float mass) |
Set physics properties of the actor. | |
Private Member Functions | |
Actor (SceneManager *pManager, const std::string &name, const std::string &sceneName, PhysicsWorld *pPhysicsWorld) | |
Constructor. | |
~Actor () | |
Destructor. | |
Private Attributes | |
SceneManager * | m_pManager |
Scene manager. | |
Ogre::SceneManager * | m_pRenderSceneManager |
Ogre scene manager to be used for rendering. | |
std::string | m_name |
Name of the actor. | |
std::string | m_sceneName |
Name of the scene responsible of this actor. | |
PhysicsWorld * | m_pPhysicsWorld |
Physics world. | |
std::string | m_modelName |
Name of the model to use. | |
Ogre::Entity * | m_pEntity |
Model to use. | |
bool | m_physics |
One of these:
| |
float | m_mass |
Mass of the actor. | |
Friends | |
class | Scene |
class | SceneNode |
It is a 3D object included in a scene.
syBR::Game::Actor::Actor | ( | SceneManager * | pManager, | |
const std::string & | name, | |||
const std::string & | sceneName, | |||
PhysicsWorld * | pPhysicsWorld | |||
) | [private] |
Constructor.
pManager | Scene manager responsible of the parent scene of this actor | |
name | Name of the actor | |
sceneName | Name of the scene responsible of this actor | |
pPhysicsWorld | Pointer to the physics world where the actor is located |
syBR::Game::Actor::~Actor | ( | ) | [private] |
Destructor.
Release used resources.
void syBR::Game::Actor::update | ( | ) |
Update the actor.
Check if the physics simulation made changes to the position and / or orientation of the actor
const std::string & syBR::Game::Actor::getName | ( | ) | const |
bool syBR::Game::Actor::setModel | ( | const std::string & | model | ) |
Set model to use for this actor.
model | Name of the model to use |
const Ogre::Vector3 syBR::Game::Actor::getScale | ( | ) | const |
Get scale.
void syBR::Game::Actor::setScale | ( | const Ogre::Vector3 & | scale | ) |
Set scale.
scale | Scale of the model in the three dimensions |
const bool syBR::Game::Actor::getPhysicsState | ( | ) | const |
Retrieve whether the actor is included in the physical simulation or not.
const float syBR::Game::Actor::getPhysicsMass | ( | ) | const |
Get the mass of the actor.
return Mass of the actor
void syBR::Game::Actor::setPhysicsProperties | ( | const bool | affected, | |
const float | mass | |||
) |
Set physics properties of the actor.
affected | One of these:
| |
mass | Mass of the actor |
friend class Scene [friend] |
friend class SceneNode [friend] |
SceneManager* syBR::Game::Actor::m_pManager [private] |
Scene manager.
Ogre::SceneManager* syBR::Game::Actor::m_pRenderSceneManager [private] |
Ogre scene manager to be used for rendering.
std::string syBR::Game::Actor::m_name [private] |
Name of the actor.
std::string syBR::Game::Actor::m_sceneName [private] |
Name of the scene responsible of this actor.
PhysicsWorld* syBR::Game::Actor::m_pPhysicsWorld [private] |
Physics world.
std::string syBR::Game::Actor::m_modelName [private] |
Name of the model to use.
Ogre::Entity* syBR::Game::Actor::m_pEntity [private] |
Model to use.
bool syBR::Game::Actor::m_physics [private] |
One of these:
float syBR::Game::Actor::m_mass [private] |
Mass of the actor.
Copyright © 2008 by Sebastien Frippiat
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008