|
RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
#include <cgamescene.h>
Public Member Functions | |
| CGameScene () | |
| used to serialize the GameScene More... | |
| CGameScene (const CGameScene &game_scene) | |
| CGameScene & | operator= (const CGameScene &game_scene) |
| virtual void | copyValuesFromObject (const CGameScene &game_scene) |
| CGameObject * | createGameObjectWithNode (const std::string &node_id, bool add_to_scene=true, const char *object_type=NULL) |
| Creates a GameObject based upon the specified Node id. More... | |
| void | addGameObject (CGameObject *game_object) |
| const CGameObject * | getGameObject (const std::string &name) const |
| const CGameObject * | getGameObject (uint uid) const |
| std::vector< CGameObject * > * | getGameObjects () const |
| CGameObject * | getGameObjectHavingTag (int tag) const |
| bool | existsGameObjectWithName (const std::string &name) |
| CGameObject * | duplicateGameObject (const CGameObject *game_object) |
| bool | removeGameObject (uint uid) |
| void | removeGameObjectWhenAble (CGameObject *game_object) |
| virtual void | clear () |
| virtual void | run () |
| virtual void | preUpdate () |
| virtual void | update () |
| virtual void | postUpdate () |
| virtual void | updateWorld () |
| virtual void | postUpdateWorld () |
| virtual void | deleteWorld () |
| virtual void | performCollisionCallbacks () |
| QList< CGameObject > | gameObjects () |
| void | setGameObjects (QList< CGameObject > game_objects) |
| btDiscreteDynamicsWorld * | dynamicsWorld () const |
| virtual | ~CGameScene () |
Public Member Functions inherited from CObject | |
| CObject () | |
| CObject (const CObject &object) | |
| CObject & | operator= (const CObject &object) |
| CObject * | retain () |
| unsigned int | release () const |
| CObject * | autorelease () |
| unsigned int | retainCount () const |
| bool | isValidCObject () const |
| virtual | ~CObject () |
Protected Member Functions | |
| std::string & | createUniqueGameObjectName (std::string &original_name) |
| virtual void | start () |
| virtual void | stopAllActions () |
Protected Member Functions inherited from CObject | |
| virtual void | copyValuesFromObject (const CObject &object) |
Protected Attributes | |
| bool | m_isRunningUpdateLoops |
| std::vector< CGameObject * > * | m_gameObjects |
| std::vector< CGameObject * > * | m_gameObjectsPendingToBeAdded |
| stores GameObjects added during the update loop More... | |
| std::vector< CGameObject * > * | m_gameObjectsPendingToBeRemoved |
| stores GameObjects removed during the update loop More... | |
| btAlignedObjectArray< btCollisionShape * > | m_collisionShapes |
| btDefaultCollisionConfiguration * | m_collisionConfiguration |
| btCollisionDispatcher * | m_dispatcher |
| btBroadphaseInterface * | m_overlappingPairCache |
| btSequentialImpulseConstraintSolver * | m_solver |
| btDiscreteDynamicsWorld * | m_dynamicsWorld |
Properties | |
| QList< CGameObject > | GameObjects |
Additional Inherited Members | |
Static Public Member Functions inherited from CObject | |
| static void | safeRetain (void *pointer) |
| template<class T > | |
| static void | safeRelease (T *pointer) |
| template<class T > | |
| static void | safeReleaseArray (T *array) |
| static void | safeRelease (const char *pointer) |
Definition at line 38 of file cgamescene.h.
| CGameScene::CGameScene | ( | ) |
used to serialize the GameScene
Definition at line 43 of file cgamescene.cpp.
| CGameScene::CGameScene | ( | const CGameScene & | game_scene | ) |
Definition at line 63 of file cgamescene.cpp.
|
virtual |
Definition at line 572 of file cgamescene.cpp.
| void CGameScene::addGameObject | ( | CGameObject * | game_object | ) |
Adds the GameObject to the GameScene
Definition at line 244 of file cgamescene.cpp.
|
virtual |
|
virtual |
Definition at line 80 of file cgamescene.cpp.
| CGameObject * CGameScene::createGameObjectWithNode | ( | const std::string & | node_id, |
| bool | add_to_scene = true, |
||
| const char * | object_type = NULL |
||
| ) |
Creates a GameObject based upon the specified Node id.
| node_id | The Node id |
| add_to_scene | Whether the GameObject must be immediately added to the GameScene |
| object_type | (optional) A special type can be specified for the GameObject (it must inherit from CGameObject) |
Definition at line 214 of file cgamescene.cpp.
|
protected |
Definition at line 330 of file cgamescene.cpp.
|
virtual |
Definition at line 475 of file cgamescene.cpp.
| CGameObject * CGameScene::duplicateGameObject | ( | const CGameObject * | game_object | ) |
Returns a duplicate of the GameObject
Definition at line 339 of file cgamescene.cpp.
| btDiscreteDynamicsWorld * CGameScene::dynamicsWorld | ( | ) | const |
Definition at line 86 of file cgamescene.cpp.
| bool CGameScene::existsGameObjectWithName | ( | const std::string & | name | ) |
Indicates whether a GameObject with the specified name already exists
Definition at line 294 of file cgamescene.cpp.
| QList< CGameObject > CGameScene::gameObjects | ( | ) |
Definition at line 399 of file cgamescene.cpp.
| const CGameObject * CGameScene::getGameObject | ( | const std::string & | name | ) | const |
Returns the GameObject with the specified name
Definition at line 260 of file cgamescene.cpp.
| const CGameObject * CGameScene::getGameObject | ( | uint | uid | ) | const |
Returns the GameObject with the specified uid
Definition at line 274 of file cgamescene.cpp.
| CGameObject * CGameScene::getGameObjectHavingTag | ( | int | tag | ) | const |
Returns the GameObject with the specified tag
Definition at line 558 of file cgamescene.cpp.
| std::vector< CGameObject * > * CGameScene::getGameObjects | ( | ) | const |
Definition at line 288 of file cgamescene.cpp.
| CGameScene & CGameScene::operator= | ( | const CGameScene & | game_scene | ) |
Definition at line 69 of file cgamescene.cpp.
|
virtual |
Definition at line 529 of file cgamescene.cpp.
|
virtual |
Calls postUpdate() on every CGameObject in the GameScene
Definition at line 184 of file cgamescene.cpp.
|
virtual |
Calls postUpdateWorld() on every CGameObject in the GameScene
Definition at line 465 of file cgamescene.cpp.
|
virtual |
Calls preUpdate() on every CGameObject in the GameScene
Reimplemented in CCustomScene.
Definition at line 159 of file cgamescene.cpp.
| bool CGameScene::removeGameObject | ( | uint | uid | ) |
Immediately removes the GameObject with the specified uid Note: You should call this method only if the GameScene is NOT running (e.g. from the Editor).
Definition at line 350 of file cgamescene.cpp.
| void CGameScene::removeGameObjectWhenAble | ( | CGameObject * | game_object | ) |
Once the GameScene is running you should remove GameObjects by calling this method.
Definition at line 374 of file cgamescene.cpp.
|
virtual |
Runs the GameScene
Definition at line 423 of file cgamescene.cpp.
| void CGameScene::setGameObjects | ( | QList< CGameObject > | game_objects | ) |
Definition at line 412 of file cgamescene.cpp.
|
protectedvirtual |
Reimplemented in CCustomScene.
Definition at line 148 of file cgamescene.cpp.
|
protectedvirtual |
Stops all CActions
Definition at line 512 of file cgamescene.cpp.
|
virtual |
Calls update() on every CGameObject in the GameScene
Definition at line 170 of file cgamescene.cpp.
|
virtual |
Calls stepSimulation() on btDiscreteDynamicsWorld and then updates all CGameObject Transforms so they match their btRigidBody Transform.
Definition at line 446 of file cgamescene.cpp.
|
protected |
Definition at line 171 of file cgamescene.h.
|
protected |
Definition at line 170 of file cgamescene.h.
|
protected |
Definition at line 172 of file cgamescene.h.
|
protected |
Definition at line 175 of file cgamescene.h.
|
protected |
Definition at line 161 of file cgamescene.h.
|
protected |
stores GameObjects added during the update loop
Definition at line 164 of file cgamescene.h.
|
protected |
stores GameObjects removed during the update loop
Definition at line 167 of file cgamescene.h.
|
protected |
Definition at line 159 of file cgamescene.h.
|
protected |
Definition at line 173 of file cgamescene.h.
|
protected |
Definition at line 174 of file cgamescene.h.
|
readwrite |
Definition at line 40 of file cgamescene.h.