Spatial Database
[InExIn]


Detailed Description

Basic spatial database for visibility and spatial region queries.

The spatialdb includes various nodes for visibility (portals and occluders) as well as hierarchy (nested spatial data structures such as octrees and kd-trees). Once you have constructed your objects in space, you can perform spatial and visibility queries.

Spatial queries allow you to figure out what elements are in a specific region, specified possibly as a bounding box or sphere.

Visibility queries allow you to figure out what elements are visible from a certain point, culled by either a maximum distance or by a view frustum. This allows you to find visible objects to pass on to a chunk of AI or rendering code.

AI_SDB_SpatialSector is a space containing multiple spatial elements, used for organizing things in a specific space. Typically a sector represents a finite space where all elements can see the entire sector, and have limited visibility to other sectors. An example of a typical sector would be one room or hallway in a building.

AI_SDB_SpatialPortal is an element describing visibility between two sectors. The visibility determination uses portals to determine which sectors are visible from other sectors. An example of a typical portal would be the doors and windows connecting rooms, and the openings between rooms and hallways.

AI_SDB_SpatialElement is an element that you want to place under the database for visibility and spatial queries.

AI_SDB_VisibilityVisitor is a query class that lets you figure out what elements are visible. Depending on the specific subclass you use, you can check what elements are visible in a view frustum (useful for camera rendering) or perhaps everything visible in a sphere around a specific point (useful for AI or LOS determination).

AI_SDB_SpatialVisitor is a query class that lets you figure out what elements are in a specific spatial region. Note that this is fundamentally different than a visibility query, since for a spatial query you basically ignore elements that provide visibility information (occluders and portals). Different visitors support different region shapes.

Notice:
Classes of this module were ripped from The Nebula Device 2 contributed modules and they were renamed so the spatial database can be used in AI library with or without TND2 engine.


Classes

class  AI_SDB_Camera
class  AI_SDB_FrustumClipper
 Encapsulates the clipping planes of a frustum, with handling of 'active clipping AI_Plane' flags. More...
class  AI_SDB_VisibleFrustumGenArray
 Visits all elements visible in a view frustum and populates an AI_Array with the visible elements. More...
class  AI_SDB_GeometryOcclusionVisitor
 A simple occlusion manager using clip planes to clip out occluded objects. More...
class  AI_SDB_OccludedFrustumVisitor
 Visits all elements visible in a view frustum, useful for rendering to a camera. More...
class  AI_SDB_PlaneClipper
 Encapsulates a set of clipping planes, handling of 'active clipping AI_Plane' flags for recursive traversal of spatial data structures. More...
class  AI_SDB_SpatialAABBTree
 A collection of elements stored in an AABB tree. More...
class  AI_SDB_SpatialElement
 The interface for elements contained within sector. More...
class  AI_SDB_BBoxSpatialElement
 A class that adds bounding-box testing to a given spatial element. More...
class  AI_SDB_SpatialPortalElement
 A visibility interface between two sectors. More...
class  AI_SDB_SpatialHierarchyElement
 The interface for elements that contain sub-elements in some special manner. More...
class  AI_SDB_SpatialOccluderElement
 The interface for occluder information. More...
class  AI_SDB_SpatialListHierarchy
 A collection of elements stored as a list. More...
class  AI_SDB_SpatialSector
 A collection of elements in a specific region of space. More...
class  AI_SDB_SphereClipper
 Encapsulates the clipping region and flags of a AI_Sphere, with handling of 'active clipping AI_Plane' flags. More...
class  AI_SDB_VisibleFrustumVisitor
 Visits all elements visible in a view frustum, useful for rendering to a camera. More...
class  AI_SDB_VisibleSphereVisitor
 Visits all elements visible in a view AI_Sphere, useful for determining a character's LOS. More...