iCelPlLayer Struct Reference
This is the Physical Layer itself. More...
#include <physicallayer/pl.h>
Public Member Functions | |
virtual void | AddEntityRemoveCallback (iCelEntityRemoveCallback *clback)=0 |
This registers a callback that is called each time when an entity is removed. | |
virtual void | AddNewEntityCallback (iCelNewEntityCallback *clback)=0 |
This registers a callback that is called each time when an entity is added. | |
virtual int | AddScope (csString version, int size)=0 |
Add an ID scope to the physical layer. | |
virtual void | AttachEntity (iObject *object, iCelEntity *entity)=0 |
Attach an entity to some object (usually an object from the engine). | |
virtual void | Cache (iBase *object)=0 |
Cache an SCF object. | |
virtual void | CallbackEveryFrame (iCelTimerListener *listener, int where)=0 |
Register this listener as one that is interested in getting an event every frame. | |
virtual void | CallbackOnce (iCelTimerListener *listener, csTicks delta, int where)=0 |
Register this listener as one that is interested in getting an event in 'delta' milliseconds. | |
virtual void | CleanCache ()=0 |
Clean up the cache. | |
virtual csPtr< iCelDataBuffer > | CreateDataBuffer (long serialnr)=0 |
Create a data buffer. | |
virtual csPtr< iCelEntityList > | CreateEmptyEntityList ()=0 |
Create an empty entity list for personal use. | |
virtual iCelEntity * | CreateEntity (iCelEntityTemplate *factory, const char *name,...)=0 |
Create an entity from a template. | |
virtual iCelEntity * | CreateEntity (iCelEntityTemplate *factory, const char *name, const celEntityTemplateParams ¶ms)=0 |
Create an entity from a template. | |
virtual csPtr< iCelEntity > | CreateEntity (const char *entname, iCelBlLayer *bl, const char *bhname,...)=0 |
Create a new physical layer entity. | |
virtual csPtr< iCelEntity > | CreateEntity (uint id)=0 |
Create a new physical layer entity, with an id provided. | |
virtual csPtr< iCelEntity > | CreateEntity ()=0 |
Create a new physical layer entity. | |
virtual csPtr< iCelEntity > | CreateEntityInScope (int scope)=0 |
Create a new physical layer entity, with the ID being allocated in the given scope. | |
virtual iCelEntityTemplate * | CreateEntityTemplate (const char *factname)=0 |
Create an entity template. | |
virtual iCelEntityTracker * | CreateEntityTracker (const char *name)=0 |
Create an entity tracker that you can use to keep track of specific sets of entities. | |
virtual iCelPropertyClass * | CreatePropertyClass (iCelEntity *entity, const char *propname)=0 |
Convenience function to create a property class from a registered class factory. | |
virtual iCelPropertyClass * | CreateTaggedPropertyClass (iCelEntity *entity, const char *propname, const char *tagname)=0 |
Convenience function to create a property class with a tag from a registered class factory. | |
virtual const char * | FetchString (csStringID id)=0 |
Find the string that corresponds with some ID. | |
virtual csStringID | FetchStringID (const char *str)=0 |
Retreive the unique ID associated with this string or create a new ID if needed. | |
virtual iCelEntity * | FindAttachedEntity (iObject *object)=0 |
Given an iObject, find the attached entity (if any). | |
virtual iCelBlLayer * | FindBehaviourLayer (const char *name) const =0 |
Find a behaviour layer by name. | |
virtual iCelEntity * | FindEntity (const char *name)=0 |
Find an entity with a given name. | |
virtual iCelEntityTemplate * | FindEntityTemplate (const char *factname)=0 |
Find an entity template with a given name. | |
virtual iCelEntityTracker * | FindEntityTracker (const char *name)=0 |
Find a tracker by name. | |
virtual csPtr< iCelEntityList > | FindNearbyEntities (iSector *sector, const csVector3 &start, const csVector3 &end, bool do_invisible=false)=0 |
Find all entities that are intersected by a beam. | |
virtual csPtr< iCelEntityList > | FindNearbyEntities (iSector *sector, const csBox3 &box, bool do_invisible=false)=0 |
Find all entities that are in a given box. | |
virtual csPtr< iCelEntityList > | FindNearbyEntities (iSector *sector, const csVector3 &pos, float radius, bool do_invisible=false)=0 |
Find all entities that are within a certain radius of a given position. | |
virtual iCelPropertyClassFactory * | FindPropertyClassFactory (const char *name) const =0 |
Find a property class factory by name. | |
virtual iCelBehaviour * | GetBehaviour (uint id)=0 |
This is a convenience function to get the behaviour that belongs to the entity for a given ID. | |
virtual iCelBlLayer * | GetBehaviourLayer (size_t idx) const =0 |
Get the specificied behaviour layer. | |
virtual size_t | GetBehaviourLayerCount () const =0 |
Get the number of registered behaviour layers. | |
virtual iCelEntity * | GetEntity (uint id)=0 |
Returns the entity with ID id. | |
virtual iCelEntity * | GetEntityByIndex (size_t idx) const =0 |
Get the specific entity by index (not by ID). | |
virtual size_t | GetEntityCount () const =0 |
Get the total number of entities. | |
virtual iCelEntityTemplate * | GetEntityTemplate (size_t idx) const =0 |
Get a specific entity template. | |
virtual size_t | GetEntityTemplateCount () const =0 |
Get the number of entity templates. | |
virtual iCelEntity * | GetHitEntity (iCamera *camera, int x, int y)=0 |
Given a position on screen find the nearest entity to the camera. | |
virtual iCelPropertyClassFactory * | GetPropertyClassFactory (size_t idx) const =0 |
Get the specificied property class factory. | |
virtual size_t | GetPropertyClassFactoryCount () const =0 |
Get the number of registered property class factories. | |
virtual bool | IsEntityAddonAllowed () const =0 |
Query if entity addons are allowed. | |
virtual bool | LoadPropertyClassFactory (const char *plugin_id)=0 |
Load a property class plugin by class id if it doesn't already exist. | |
virtual void | RegisterBehaviourLayer (iCelBlLayer *bl)=0 |
Register a behaviour layer. | |
virtual void | RegisterPropertyClassFactory (iCelPropertyClassFactory *pf)=0 |
Register a property class factory with this physical layer. | |
virtual void | RemoveCallbackEveryFrame (iCelTimerListener *listener, int where)=0 |
Remove all 'every-frame' callbacks to a specific listener. | |
virtual void | RemoveCallbackOnce (iCelTimerListener *listener, int where)=0 |
Remove all 'once' callbacks to a specific listener. | |
virtual void | RemoveEntities ()=0 |
Remove all entities. | |
virtual void | RemoveEntity (iCelEntity *entity)=0 |
Remove an entity from the physical layer. | |
virtual void | RemoveEntityRemoveCallback (iCelEntityRemoveCallback *clback)=0 |
Removes an registered RemoveCallback. | |
virtual void | RemoveEntityTemplate (iCelEntityTemplate *entfact)=0 |
Remove an entity template. | |
virtual void | RemoveEntityTemplates ()=0 |
Remove all entity templates. | |
virtual void | RemoveEntityTracker (iCelEntityTracker *tracker)=0 |
Remove a tracker. | |
virtual void | RemoveNewEntityCallback (iCelNewEntityCallback *clback)=0 |
Removes an registered NewCallback. | |
virtual void | SetEntityAddonAllowed (bool allow)=0 |
Enable or disable the operations of the cel entity addon. | |
virtual void | UnattachEntity (iObject *object, iCelEntity *entity)=0 |
Unattach an entity from some object. | |
virtual void | Uncache (iBase *object)=0 |
Uncache an SCF object. | |
virtual void | UnregisterBehaviourLayer (iCelBlLayer *bl)=0 |
Unregister a behaviour layer. | |
virtual void | UnregisterPropertyClassFactory (iCelPropertyClassFactory *pf)=0 |
Unregister a property class factory. |
Detailed Description
This is the Physical Layer itself.
Definition at line 107 of file pl.h.
Member Function Documentation
|
This registers a callback that is called each time when an entity is removed.
|
|
This registers a callback that is called each time when an entity is added.
|
|
Add an ID scope to the physical layer. Entities are created by propclasses only in the default scope so you can completely manage the ID allocation of your own scopes. |
|
Attach an entity to some object (usually an object from the engine). This function will check if the entity was already attached and do nothing in that case. |
|
Cache an SCF object. This effectively means that the PL will keep a references to this object. This function will not add the object if it is already cached so it is safe to call multiple times. |
|
Register this listener as one that is interested in getting an event every frame. This will call TickEveryFrame().
|
|
Register this listener as one that is interested in getting an event in 'delta' milliseconds. This will call Tick().
|
|
Clean up the cache. This will decrease the ref count of all objects in the cache. Possibly this will remove them unless some other object still has a reference. |
|
Create a data buffer. Usually property class implementations will call this to create a data buffer for their own persistent data. The use of this is not required. A property class can just as well make its own implementation of iCelDataBuffer. |
|
Create an empty entity list for personal use.
|
|
Create an entity from a template.
|
|
Create an entity from a template.
|
|
Create a new physical layer entity. The physical layer will keep a reference to this entity. You need to call RemoveEntity() to remove the entity. This version accepts a name for the entity and will also create a behaviour from the given behaviour layer. This function will use the reporter to report an error if the entity could not be created for some reason (or the behaviour failed). In that case this function returns 0. This function will also create a number of property classes for this entity. You have to end the list of property class names with CEL_PROPCLASS_END. The variable parameters should be property class strings.
|
|
Create a new physical layer entity, with an id provided. You should ensure that the id provided isn't already used and that you use the hash implementation of the numreg. |
|
Create a new physical layer entity. The physical layer will keep a reference to this entity. You need to call RemoveEntity() to remove the entity. |
|
Create a new physical layer entity, with the ID being allocated in the given scope.
|
|
Create an entity template.
|
|
Create an entity tracker that you can use to keep track of specific sets of entities. Call RemoveEntityTracker() to remove it. |
|
Convenience function to create a property class from a registered class factory. Note that the reference count of the returned class is not turned up. |
|
Convenience function to create a property class with a tag from a registered class factory. Note that the reference count of the returned class is not turned up. |
|
Find the string that corresponds with some ID. Returns 0 if there is no such string. |
|
Retreive the unique ID associated with this string or create a new ID if needed. There are various places in CEL where this is used. The convention on string names is usually 'cel.xxx.yyy'. With 'xxx' equal to the type of string (i.e. 'property'), and 'yyy' the name of the given type (i.e. the property name). An example: 'cel.property.startsector'. |
|
Given an iObject, find the attached entity (if any).
|
|
Find a behaviour layer by name.
|
|
Find an entity with a given name. This function will scan all entities (at maximum) the first time it is called for a given entity. Later on it will use a hash for faster finding. |
|
Find an entity template with a given name.
|
|
Find a tracker by name.
|
|
Find all entities that are intersected by a beam. This uses the attached entities from above.
|
|
Find all entities that are in a given box. This uses the attached entities from above.
|
|
Find all entities that are within a certain radius of a given position. This uses the attached entities from above.
|
|
Find a property class factory by name.
|
|
This is a convenience function to get the behaviour that belongs to the entity for a given ID.
|
|
Get the specificied behaviour layer.
|
|
Get the number of registered behaviour layers.
|
|
Returns the entity with ID id.
|
|
Get the specific entity by index (not by ID).
|
|
Get the total number of entities.
|
|
Get a specific entity template.
|
|
Get the number of entity templates.
|
|
Given a position on screen find the nearest entity to the camera. Returns 0 if no entity found. This function depends on the attached entities. |
|
Get the specificied property class factory.
|
|
Get the number of registered property class factories.
|
|
Query if entity addons are allowed.
|
|
Load a property class plugin by class id if it doesn't already exist. Returns false on failure. This must be called before you can use property classes from this factory. |
|
Register a behaviour layer.
|
|
Register a property class factory with this physical layer. It is not needed for apps to call this function as the property class factory itself will do it when it is loaded. To load a property class factory plugin you can use LoadPropertyClassFactory(). |
|
Remove all 'every-frame' callbacks to a specific listener.
|
|
Remove all 'once' callbacks to a specific listener.
|
|
Remove all entities.
|
|
Remove an entity from the physical layer.
|
|
Removes an registered RemoveCallback.
|
|
Remove an entity template.
|
|
Remove all entity templates.
|
|
Remove a tracker.
|
|
Removes an registered NewCallback.
|
|
Enable or disable the operations of the cel entity addon. This addon will enable users to add entities from a CS world file. This addon will not do that if this flag is disabled (enabled by default). This is mostly used by the persistence layer to prevent the addons from working then since the entities will be loaded otherwise in that situation. |
|
Unattach an entity from some object.
|
|
Uncache an SCF object.
|
|
Unregister a behaviour layer.
|
|
Unregister a property class factory.
|
The documentation for this struct was generated from the following file:
- physicallayer/pl.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.6