File OgreObjectManager.h¶
-
namespace
Ogre File: MovableText.h
Description: This creates a billboarding object that display a text. Note: This object must have a dedicated scene node since it will rotate it to face the camera (OGRE 2.1)
- Author
2003 by cTh see gavocanov@rambler.ru 2006 by barraq see nospam@barraquand.com 2012 to work with newer versions of OGRE by MindCalamity mindcalamity@gmail.com 2015 to work on OGRE 2.1 (but not on older versions anymore) by Jayray jeremy.richert1@gmail.com
-
namespace
Gsage -
class
OgreObjectManager: public EventDispatcher Public Functions
-
OgreObjectManager(OgreRenderSystem *rs)¶
-
virtual
~OgreObjectManager()¶
-
OgreObject *
create(const DataProxy &dict, const std::string &owner, Ogre::SceneManager *sceneManager, Ogre::SceneNode *parent = 0)¶ Create object from the DataProxy
- Parameters
dict: DataProxy with all values (dict should contain type field)owner: Owner entity of the created objectsceneManager: Ogre::SceneManager to create object inparent: Parent object to attach to
-
OgreObject *
create(const DataProxy &dict, const std::string &owner, Ogre::SceneManager *sceneManager, const std::string &type, Ogre::SceneNode *parent = 0)¶ Create object from the DataProxy
- Parameters
dict: DataProxy with all valuesowner: Owner entity of the created objectsceneManager: Ogre::SceneManager to create object intype: Object type string, defined explicitlyparent: Parent object to attach to
-
OgreObject *
create(const DataProxy &dict, const std::string &owner, Ogre::SceneManager *sceneManager, const std::string &type, const DataProxy ¶ms, OgreObject *parent = 0)¶ Create object from the DataProxy
- Parameters
dict: DataProxy with all valuesowner: Owner entity of the created objectsceneManager: Ogre::SceneManager to create object intype: Object type string, defined explicitlyparent: Parent object to attach to
-
template<typename
C>
C *create(const DataProxy &dict, const std::string &owner, Ogre::SceneManager *sceneManager, Ogre::SceneNode *parent = 0)¶
-
void
destroy(OgreObject *object)¶ Destroy object
- Parameters
object: Object to destroy
-
template<typename
C>
voidregisterElement(const std::string &type)¶ Register new element type, so factory will be able to create it
- Parameters
type: String type representation
-
template<typename
C>
voidregisterElement()¶ Register new element type, so factory will be able to create id. For this method, visual element should have static std::string TYPE defined
-
bool
unregisterElement(const std::string &type)¶ Unregister existing element type It will destroy all existing objects of that type
- Parameters
type: String type representation
-
template<typename
C>
boolunregisterElement()¶ Unregister existing element type It will destroy all existing objects of that type
-
OgreRenderSystem *
getRenderSystem()¶ Get targeted render system instance
Private Types
-
typedef std::map<std::string, OgreObjectPool *>
OgreObjectsCollections¶
-
template<typename
C>
classConcreteOgreObjectPool: public Gsage::OgreObjectManager::OgreObjectPool Public Functions
-
virtual
~ConcreteOgreObjectPool()¶
-
OgreObject *
allocate()¶
-
void
remove(OgreObject *object)¶
-
void
clear()¶
Private Members
-
ObjectPool<C>
mObjects¶
-
virtual
-
class
OgreObjectPool Public Functions
-
virtual
~OgreObjectPool()¶
-
virtual OgreObject *
allocate() = 0¶
-
virtual void
remove(OgreObject *object) = 0¶
-
virtual
-
-
class
OgreObjectManagerEvent: public Event - #include <OgreObjectManager.h>
Event related to factory lifecycle
Public Functions
-
OgreObjectManagerEvent(Event::ConstType type, const std::string &id, OgreObject *object = 0)¶
-
virtual
~OgreObjectManagerEvent()¶
-
const std::string &
getId() const¶ Get factory id that was unregistered or object id related to event
-
const OgreObject *
getObject() const¶ Related object
-
-
class