Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# Ogre::EntityFactory Class Reference

Factory object for creating Entity instances. More...

`#include <OgreEntity.h>`

Inheritance diagram for Ogre::EntityFactory:

[legend]
List of all members.

## Public Member Functions
| EntityFactory ()
| ~EntityFactory ()
const String & | getType (void) const
| Get the type of the object to be created.
void | destroyInstance (MovableObject *obj)
| Destroy an instance of the object.
virtual MovableObject * | createInstance (const String &name, SceneManager *manager, const NameValuePairList *params=0)
| Create a new instance of the object.
virtual bool | requestTypeFlags (void) const
| Does this factory require the allocation of a 'type flag', used to selectively include / exclude this type from scene queries?
void | _notifyTypeFlags (unsigned long flag)
| Notify this factory of the type mask to apply.
unsigned long | getTypeFlags (void) const
| Gets the type flag for this factory.
## Static Public Attributes
static String | FACTORY_TYPE_NAME
## Protected Member Functions
MovableObject * | createInstanceImpl (const String &name, const NameValuePairList *params)
| Internal implementation of create method - must be overridden.
## Protected Attributes
unsigned long | mTypeFlag
| Type flag, allocated if requested.

## Detailed Description

Factory object for creating Entity instances.

Definition at line 754 of file OgreEntity.h.

## Constructor & Destructor Documentation

Ogre::EntityFactory::EntityFactory | ( |  | ) |

| Definition at line 759 of file OgreEntity.h.

Ogre::EntityFactory::~EntityFactory | ( |  | ) |

| Definition at line 760 of file OgreEntity.h.

## Member Function Documentation

void Ogre::MovableObjectFactory::_notifyTypeFlags | ( | unsigned long | flag | ) | `[inherited]`

| Notify this factory of the type mask to apply. Remarks: This should normally only be called by Root in response to a 'true' result from requestTypeMask. However, you can actually use it yourself if you're careful; for example to assign the same mask to a number of different types of object, should you always wish them to be treated the same in queries. Definition at line 518 of file OgreMovableObject.h.

virtual MovableObject* Ogre::MovableObjectFactory::createInstance | ( | const String & | name,
|  | SceneManager * | manager,
|  | const NameValuePairList * | params = `0`
| ) | `[virtual, inherited]`

  | Create a new instance of the object. Parameters:
  | name | The name of the new object
  | manager | The SceneManager instance that will be holding the instance once created.
  | params | Name/value pair list of additional parameters required to construct the object (defined per subtype). Optional.

MovableObject* Ogre::EntityFactory::createInstanceImpl | ( | const String & | name,
|  | const NameValuePairList * | params
| ) | `[protected, virtual]`

| Internal implementation of create method - must be overridden. Implements Ogre::MovableObjectFactory.

void Ogre::EntityFactory::destroyInstance | ( | MovableObject * | obj | ) | `[virtual]`

| Destroy an instance of the object. Implements Ogre::MovableObjectFactory.

const String& Ogre::EntityFactory::getType | ( | void |  | ) | const`[virtual]`

| Get the type of the object to be created. Implements Ogre::MovableObjectFactory.

unsigned long Ogre::MovableObjectFactory::getTypeFlags | ( | void |  | ) | const`[inherited]`

| Gets the type flag for this factory. Remarks: A type flag is like a query flag, except that it applies to all instances of a certain type of object. Definition at line 525 of file OgreMovableObject.h.

virtual bool Ogre::MovableObjectFactory::requestTypeFlags | ( | void |  | ) | const`[virtual, inherited]`

| Does this factory require the allocation of a 'type flag', used to selectively include / exclude this type from scene queries? Remarks: The default implementation here is to return 'false', ie not to request a unique type mask from Root. For objects that never need to be excluded in SceneQuery results, that's fine, since the default implementation of MovableObject::getTypeFlags is to return all ones, hence matching any query type mask. However, if you want the objects created by this factory to be filterable by queries using a broad type, you have to give them a (preferably unique) type mask - and given that you don't know what other MovableObject types are registered, Root will allocate you one. Definition at line 509 of file OgreMovableObject.h.

## Member Data Documentation

String Ogre::EntityFactory::FACTORY_TYPE_NAME`[static]`

| Definition at line 762 of file OgreEntity.h.

unsigned long Ogre::MovableObjectFactory::mTypeFlag`[protected, inherited]`

| Type flag, allocated if requested. Definition at line 472 of file OgreMovableObject.h.

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

- OgreEntity.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 30 10:51:13 2007