syBR::Game::Actor Class Reference

Scene actor class. More...

#include <Actor.hpp>

List of all members.

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

SceneManagerm_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.
PhysicsWorldm_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:
  • true if the actor is included in the physical simulation
  • false otherwise.

float m_mass
 Mass of the actor.

Friends

class Scene
class SceneNode


Detailed Description

Scene actor class.

It is a 3D object included in a scene.


Constructor & Destructor Documentation

syBR::Game::Actor::Actor ( SceneManager pManager,
const std::string &  name,
const std::string &  sceneName,
PhysicsWorld pPhysicsWorld 
) [private]

Constructor.

Parameters:
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.


Member Function Documentation

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

Get actor name.

Returns:
Actor name

bool syBR::Game::Actor::setModel ( const std::string &  model  ) 

Set model to use for this actor.

Parameters:
model Name of the model to use
Returns:
One of these:
  • true in case of success
  • false otherwise

const Ogre::Vector3 syBR::Game::Actor::getScale (  )  const

Get scale.

Returns:
Scale of the model in the three dimensions

void syBR::Game::Actor::setScale ( const Ogre::Vector3 &  scale  ) 

Set scale.

Parameters:
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.

Returns:
One of these:
  • true if it is included in the physics simulation
  • false otherwise

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.

Parameters:
affected One of these:
  • true to include the actor in the physics simulation
  • false otherwise
mass Mass of the actor


Friends And Related Function Documentation

friend class Scene [friend]

friend class SceneNode [friend]


Member Data Documentation

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.


The documentation for this class was generated from the following files:

Copyright © 2008 by Sebastien Frippiat
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
Last modified Tue Dec 30 17:57:34 2008