iPcZoneManager Struct Reference
This is the zone manager. More...
#include <propclass/zone.h>
Public Member Functions | |
virtual iCelRegion * | CreateRegion (const char *name)=0 |
Create a region. | |
virtual iCelZone * | CreateZone (const char *name)=0 |
Create a zone. | |
virtual void | EnableColliderWrappers (bool en)=0 |
By default the zone manager will create collider wrappers (csColliderWrapper) for all objects that are loaded. | |
virtual iCelRegion * | FindRegion (const char *name) const =0 |
Get the specified region. | |
virtual void | FindStartLocations (iStringArray *regionnames, iStringArray *startnames)=0 |
Find all valid starting locations in all current loaded regions. | |
virtual iCelZone * | FindZone (const char *name) const =0 |
Get the specified zone. | |
virtual void | GetLastStartLocation (iString *regionname, iString *startname)=0 |
Return the last used region and startname for PointCamera() or PointMesh(). | |
virtual const char * | GetLastStartName ()=0 |
Return the last used startname name for PointCamera() or PointMesh(). | |
virtual const char * | GetLastStartRegionName ()=0 |
Return the last used region name for PointCamera() or PointMesh(). | |
virtual int | GetLoadingMode () const =0 |
Get the current loading mode. | |
virtual iCelRegion * | GetRegion (int idx) const =0 |
Get the specified region. | |
virtual size_t | GetRegionCount () const =0 |
Get the count of regions. | |
virtual iCelZone * | GetZone (int idx) const =0 |
Get the specified zone. | |
virtual size_t | GetZoneCount () const =0 |
Get the count of zones. | |
virtual bool | IsColliderWrappers () const =0 |
Is collider wrapper creation enabled? | |
virtual bool | Load (const char *path, const char *file)=0 |
Load a zone definition from an XML file. | |
virtual bool | Load (iDocumentNode *node)=0 |
Load a zone definition from an XML node. | |
virtual int | PointCamera (const char *entity, const char *regionname, const char *startname=0)=0 |
Take the specified region (by name), load all zones associated with that region and then setup the given pccamera so that it points to the specified starting posision in this region. | |
virtual int | PointMesh (const char *entity, const char *regionname, const char *startname=0)=0 |
Take the specified region (by name), load all zones associated with that region and then place the given pcmesh so that it is positioned at the specified starting posision in this region. | |
virtual void | RemoveAllRegions ()=0 |
Remove all regions from this zone. | |
virtual void | RemoveAllZones ()=0 |
Remove all zones. | |
virtual bool | RemoveRegion (iCelRegion *region)=0 |
Delete the given region. | |
virtual bool | RemoveZone (iCelZone *zone)=0 |
Delete the given zone. | |
virtual void | SetLoadingMode (int mode)=0 |
Set different loading mode:
|
Detailed Description
This is the zone manager.In this property class you can define zones. A zone is a collection of regions that are either all together in memory or not at all. A region is made from a set of maps and represents the actual geometry that is in memory. A region is loaded or unloaded as one unit. A region can be in multiple zones. In that case if you are in some region then all zones that contain that region will be in memory, The representation of a region.
This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):
- DisableCD: no parameters. Don't create collider wrappers.
- EnableCD: no parameters. Create collider wrappers (default).
- Load: parameters 'path' (string), and 'file' (string).
- PointMesh: parameters 'entity' (string), 'region' (string), and 'start' (string).
- PointCamera: parameters 'entity' (string), 'region' (string), and 'start' (string).
This property class can send out the following messages to the behaviour (add prefix 'cel.parameter.' to get the ID for parameters):
- pczonemanager_addregion: new region has been added (region)
- pczonemanager_remregion: region will be removed (region)
- pczonemanager_startloading: loading of regions starts
- pczonemanager_stoploading: loading of regions stops
- pczonemanager_errorloading: loading of regions stops with error (region)
Definition at line 255 of file zone.h.
Member Function Documentation
|
Create a region.
|
|
Create a zone.
|
|
By default the zone manager will create collider wrappers (csColliderWrapper) for all objects that are loaded. If you don't want that behaviour you can disable it here. |
|
Get the specified region.
|
|
Find all valid starting locations in all current loaded regions.
|
|
Get the specified zone.
|
|
Return the last used region and startname for PointCamera() or PointMesh(). Returns an empty region name if those functions have not been called yet. |
|
Return the last used startname name for PointCamera() or PointMesh().
|
|
Return the last used region name for PointCamera() or PointMesh(). Returns an empty region name if those functions have not been called yet. |
|
Get the current loading mode.
|
|
Get the specified region.
|
|
Get the count of regions.
|
|
Get the specified zone.
|
|
Get the count of zones.
|
|
Is collider wrapper creation enabled?
|
|
Load a zone definition from an XML file. The XML file should contain a 'level' or 'world' node. In case it is a 'world' file then the zone manager will automatically create a region called 'main' and a zone called 'main' with a default start location. This is a conveniance.
|
|
Load a zone definition from an XML node.
|
|
Take the specified region (by name), load all zones associated with that region and then setup the given pccamera so that it points to the specified starting posision in this region. If 0 is given then the default position will be used. Returns one of:
|
|
Take the specified region (by name), load all zones associated with that region and then place the given pcmesh so that it is positioned at the specified starting posision in this region. If 0 is given then the default position will be used. Returns one of:
|
|
Remove all regions from this zone.
|
|
Remove all zones.
|
|
Delete the given region. Returns false if the region could not be found in this zone. |
|
Delete the given zone. Returns false if the zone could not be found. |
|
Set different loading mode:
|
The documentation for this struct was generated from the following file:
- propclass/zone.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.6