AI_SDB_VisibleSphereVisitor Class Reference
[Spatial Database]
#include <AI_SDB_VisibleSphereVisitor.h>
Detailed Description
Visits all elements visible in a view AI_Sphere, useful for determining a character's LOS.This visitor finds all the elements possible visible from a given viewpoint within a view AI_Sphere. This is useful for determining objects visible by a character in all directions.
The visitor will call Visit() for every element determined possibly visible.
Public Member Functions | |
AI_SDB_VisibleSphereVisitor (const AI_Sphere &viewsphere) | |
~AI_SDB_VisibleSphereVisitor () | |
virtual void | Reset () |
void | Reset (const AI_Sphere &viewsphere) |
Reset any data and reposition the AI_Sphere. | |
virtual void | Visit (AI_SDB_SpatialElement *visitee) |
Test and possibly process an element. | |
virtual AI_SDB_VisitorFlags | VisibilityTest (const AI_BBox &testbox, AI_SDB_VisitorFlags flags) |
virtual AI_SDB_VisitorFlags | VisibilityTest (const AI_Sphere &testsphere, AI_SDB_VisitorFlags flags) |
virtual void | EnterLocalSpace (AI_Matrix44 &warp) |
virtual void | LeaveLocalSpace () |
leave a local space | |
Protected Member Functions | |
AI_SDB_SphereClipper & | GetSphereClipper () const |
gets the current AI_Sphere clipper used | |
Protected Attributes | |
AI_Array< AI_Sphere > | m_viewspherestack |
AI_Array< AI_SDB_SphereClipper > | m_sphereclipperstack |
Constructor & Destructor Documentation
AI_SDB_VisibleSphereVisitor::AI_SDB_VisibleSphereVisitor | ( | const AI_Sphere & | viewsphere | ) |
AI_SDB_VisibleSphereVisitor::~AI_SDB_VisibleSphereVisitor | ( | ) |
Member Function Documentation
void AI_SDB_VisibleSphereVisitor::Reset | ( | ) | [virtual] |
Reset any state use during a visibility sweep. If you use a visitor multiple times, reset it between each visibility collection
Reimplemented from AI_SDB_VisibilityVisitor.
Reimplemented in AI_SDB_VisibleSphereGenArray.
void AI_SDB_VisibleSphereVisitor::Reset | ( | const AI_Sphere & | viewsphere | ) |
void AI_SDB_VisibleSphereVisitor::Visit | ( | AI_SDB_SpatialElement * | visitee | ) | [virtual] |
Test and possibly process an element.
Implements AI_SDB_VisibilityVisitor.
Reimplemented in AI_SDB_VisibleSphereGenArray.
AI_SDB_VisitorFlags AI_SDB_VisibleSphereVisitor::VisibilityTest | ( | const AI_BBox & | testbox, | |
AI_SDB_VisitorFlags | flags | |||
) | [virtual] |
Check if an element should be culled. If the returned AI_SDB_VisitorFlags produces a TestResult() of true, the element is visible. The returned AI_SDB_VisitorFlags can be used for more efficient visibility tests of primitives enclosed in this bounding box
Implements AI_SDB_VisibilityVisitor.
AI_SDB_VisitorFlags AI_SDB_VisibleSphereVisitor::VisibilityTest | ( | const AI_Sphere & | testsphere, | |
AI_SDB_VisitorFlags | flags | |||
) | [virtual] |
Check if an element should be culled. If the returned AI_SDB_VisitorFlags produces a TestResult() of true, the element is visible. The returned AI_SDB_VisitorFlags can be used for more efficient visibility tests of primitives enclosed in this bounding AI_Sphere
Implements AI_SDB_VisibilityVisitor.
void AI_SDB_VisibleSphereVisitor::EnterLocalSpace | ( | AI_Matrix44 & | warp | ) | [virtual] |
entering a new local space; the matrix given will transform from the current local system into the new space local coordinate system. This is used to possibly update a transform matrix or to transform the spatial region to a new coordinate system.
Reimplemented from AI_SDB_VisibilityVisitor.
void AI_SDB_VisibleSphereVisitor::LeaveLocalSpace | ( | ) | [virtual] |
AI_SDB_SphereClipper & AI_SDB_VisibleSphereVisitor::GetSphereClipper | ( | ) | const [inline, protected] |
gets the current AI_Sphere clipper used
Member Data Documentation
The documentation for this class was generated from the following files: