Public Member Functions

aesop::LeafZone Class Reference
[AESOP Map and Zone Interfaces]

A leaf zone is a special kind of Zone. More...

#include <zone.h>

Inheritance diagram for aesop::LeafZone:
Inheritance graph
[legend]
Collaboration diagram for aesop::LeafZone:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~LeafZone (void) throw ()
virtual void iterateVisibleZones (IN leafzone_iteration_fn callback, IN void *context)=0
 iterate over other leaf zones visible from here (includes self!)
virtual bool isLeafVisible (IN LeafZone *lzRemote)=0 throw ()
 is the remote leaf zone visible to this leaf zone? Implementers: remember that a leaf should be visible to itself!
virtual void iterateStaticInstances (IN instance_iteration_fn callback, IN void *context)=0
 iterate over all static type instances in zone and call callback (see the AESOP Types and Instances library for instance information)

Detailed Description

A leaf zone is a special kind of Zone.

It is a leaf of the hierarchical zone tree (no children), hence the name. Leaf zones are strictly disjoint (do not intersect any other zones except their parents).

Most importantly, only leaf zones are allowed to contain anything interesting. Only leaf zones can contain type instances (see AESOP Types and Instances). In practice, leaf zones contain static type instances only. Dynamic (moving) instances are handled separately, although the hierarchical zone space partitioning helps manage this.

Leaf zones are required to be convex. The fact that any two points in a leaf zone can be connected by a straight line is a big help to AI engines that need to figure out how to get from A to B (crossing zones is a different problem).

Leaf zones must contain a list of all other leaf zones that are potentially visible. This is used for efficient rendering. Do an internet search for "potentially visible set" for more information.

LeafZone objects (like Zone and Map) should never be aware of drawing or rendering. Other code libraries can use these objects to render.

LeafZone objects do not know anything about types! That is, a leaf zone will contain rich instances, but it won't know anything about the underlying type. In particular, if you load a map with zones containing instances, you'll have to load the types yourself if necessary.

Virtual leaf zones are regular LeafZone objects, with one difference: they have no real extent. They can contain objects, but only for the purposes of rendering. Commonly, virtual leaves are used to contain terrain and skybox objects. These are the sorts of objects that need to be rendered, but don't interact with the player in the usual way. (Skyboxes can never be reached, for instance, and terrain is very large and typically spans multiple real LeafZone objects). Using virtual leaf zones let you take advantage of the visible leaf zone list to control when objects are rendered, but not worry about 3D extents.

Definition at line 161 of file zone.h.


Constructor & Destructor Documentation

aesop::LeafZone::~LeafZone ( void   )  throw () [virtual]

Definition at line 41 of file aesop-map.cpp.


Member Function Documentation

virtual void aesop::LeafZone::iterateVisibleZones ( IN leafzone_iteration_fn  callback,
IN void *  context 
) [pure virtual]

iterate over other leaf zones visible from here (includes self!)

virtual bool aesop::LeafZone::isLeafVisible ( IN LeafZone lzRemote  )  throw () [pure virtual]

is the remote leaf zone visible to this leaf zone? Implementers: remember that a leaf should be visible to itself!

virtual void aesop::LeafZone::iterateStaticInstances ( IN instance_iteration_fn  callback,
IN void *  context 
) [pure virtual]

iterate over all static type instances in zone and call callback (see the AESOP Types and Instances library for instance information)


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