CEL

Public API Reference

Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

iPcZoneManager Struct Reference

This is the zone manager. More...

#include <propclass/zone.h>

List of all members.

Public Member Functions

virtual void EnableColliderWrappers (bool en)=0
 By default the zone manager will create collider wrappers (csColliderWrapper) for all objects that are loaded.
virtual bool IsColliderWrappers () const =0
 Is collider wrapper creation enabled?
virtual bool Load (iDocumentNode *node)=0
 Load a zone definition from an XML node.
virtual bool Load (const char *path, const char *file)=0
 Load a zone definition from an XML file.
virtual iCelZoneCreateZone (const char *name)=0
 Create a zone.
virtual size_t GetZoneCount () const =0
 Get the count of zones.
virtual iCelZoneGetZone (int idx) const =0
 Get the specified zone.
virtual iCelZoneFindZone (const char *name) const =0
 Get the specified zone.
virtual bool RemoveZone (iCelZone *zone)=0
 Delete the given zone.
virtual void RemoveAllZones ()=0
 Remove all zones.
virtual iCelRegionCreateRegion (const char *name)=0
 Create a region.
virtual size_t GetRegionCount () const =0
 Get the count of regions.
virtual iCelRegionGetRegion (int idx) const =0
 Get the specified region.
virtual iCelRegionFindRegion (const char *name) const =0
 Get the specified region.
virtual bool RemoveRegion (iCelRegion *region)=0
 Delete the given region.
virtual void RemoveAllRegions ()=0
 Remove all regions from this zone.
virtual void FindStartLocations (iStringArray *regionnames, iStringArray *startnames)=0
 Find all valid starting locations in all current loaded regions.
virtual void GetLastStartLocation (iString *regionname, iString *startname)=0
 Return the last used region and startname for PointCamera() or PointMesh().
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.


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):

This property class can send out the following messages to the behaviour (add prefix 'cel.parameter.' to get the ID for parameters):

Definition at line 236 of file zone.h.


Member Function Documentation

virtual iCelRegion* iPcZoneManager::CreateRegion const char *  name  )  [pure virtual]
 

Create a region.

virtual iCelZone* iPcZoneManager::CreateZone const char *  name  )  [pure virtual]
 

Create a zone.

virtual void iPcZoneManager::EnableColliderWrappers bool  en  )  [pure virtual]
 

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.

virtual iCelRegion* iPcZoneManager::FindRegion const char *  name  )  const [pure virtual]
 

Get the specified region.

virtual void iPcZoneManager::FindStartLocations iStringArray *  regionnames,
iStringArray *  startnames
[pure virtual]
 

Find all valid starting locations in all current loaded regions.

virtual iCelZone* iPcZoneManager::FindZone const char *  name  )  const [pure virtual]
 

Get the specified zone.

virtual void iPcZoneManager::GetLastStartLocation iString *  regionname,
iString *  startname
[pure virtual]
 

Return the last used region and startname for PointCamera() or PointMesh().

Returns an empty region name if those functions have not been called yet.

virtual iCelRegion* iPcZoneManager::GetRegion int  idx  )  const [pure virtual]
 

Get the specified region.

virtual size_t iPcZoneManager::GetRegionCount  )  const [pure virtual]
 

Get the count of regions.

virtual iCelZone* iPcZoneManager::GetZone int  idx  )  const [pure virtual]
 

Get the specified zone.

virtual size_t iPcZoneManager::GetZoneCount  )  const [pure virtual]
 

Get the count of zones.

virtual bool iPcZoneManager::IsColliderWrappers  )  const [pure virtual]
 

Is collider wrapper creation enabled?

virtual bool iPcZoneManager::Load const char *  path,
const char *  file
[pure virtual]
 

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.

Parameters:
path is a VFS path. Current VFS dir will be set to that path. Can be 0 if no path is desired.
file is a VFS file.
Returns:
true on success. On failure the error will be reported to the reporter and false will be returned.

virtual bool iPcZoneManager::Load iDocumentNode *  node  )  [pure virtual]
 

Load a zone definition from an XML node.

Parameters:
node is the node containing region and zone definitions.
Returns:
true on success. On failure the error will be reported to the reporter and false will be returned.

virtual int iPcZoneManager::PointCamera const char *  entity,
const char *  regionname,
const char *  startname = 0
[pure virtual]
 

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:

  • CEL_ZONEERROR_OK: no error
  • CEL_ZONEERROR_BADREGION: can't find region
  • CEL_ZONEERROR_BADSTART: can't find start
  • CEL_ZONEERROR_LOAD: error loading zone
Parameters:
entity is the name of the entity that contains the pccamera property class.
regionname the name of the region to load.
startname the name of the starting position.

virtual int iPcZoneManager::PointMesh const char *  entity,
const char *  regionname,
const char *  startname = 0
[pure virtual]
 

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:

  • CEL_ZONEERROR_OK: no error
  • CEL_ZONEERROR_BADREGION: can't find region
  • CEL_ZONEERROR_BADSTART: can't find start
  • CEL_ZONEERROR_LOAD: error loading zone
Parameters:
entity is the name of the entity that contains the pcmesh property class.
regionname the name of the region to load.
startname the name of the starting position.

virtual void iPcZoneManager::RemoveAllRegions  )  [pure virtual]
 

Remove all regions from this zone.

virtual void iPcZoneManager::RemoveAllZones  )  [pure virtual]
 

Remove all zones.

virtual bool iPcZoneManager::RemoveRegion iCelRegion region  )  [pure virtual]
 

Delete the given region.

Returns false if the region could not be found in this zone.

virtual bool iPcZoneManager::RemoveZone iCelZone zone  )  [pure virtual]
 

Delete the given zone.

Returns false if the zone could not be found.


The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4