News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::GridDatabase class Reference

Zap::GridDatabase Class Reference

#include <gridDB.h>


Public Types

enum  {
  BucketWidth = 256,
  BucketRowCount = 16,
  BucketMask = BucketRowCount - 1
}

Public Member Functions

 GridDatabase ()
GameObjectfindObjectLOS (U32 typeMask, U32 stateIndex, Point rayStart, Point rayEnd, float &collisionTime, Point &surfaceNormal)
void findObjects (U32 typeMask, Vector< GameObject * > &fillVector, Rect &extents)
void addToExtents (GameObject *theObject, Rect &extents)
void removeFromExtents (GameObject *theObject, Rect &extents)

Data Fields

U32 mQueryId
BucketEntrymBuckets [BucketRowCount][BucketRowCount]
ClassChunker< BucketEntrymChunker


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
BucketWidth  Width/height of each bucket in pixels.
BucketRowCount  Number of buckets per grid row, and number of rows.
BucketMask 


Constructor & Destructor Documentation

Zap::GridDatabase::GridDatabase  ) 
 


Member Function Documentation

GameObject* Zap::GridDatabase::findObjectLOS U32  typeMask,
U32  stateIndex,
Point  rayStart,
Point  rayEnd,
float &  collisionTime,
Point surfaceNormal
 

void Zap::GridDatabase::findObjects U32  typeMask,
Vector< GameObject * > &  fillVector,
Rect extents
 

void Zap::GridDatabase::addToExtents GameObject theObject,
Rect extents
 

void Zap::GridDatabase::removeFromExtents GameObject theObject,
Rect extents
 


Field Documentation

U32 Zap::GridDatabase::mQueryId
 

BucketEntry* Zap::GridDatabase::mBuckets[BucketRowCount][BucketRowCount]
 

ClassChunker<BucketEntry> Zap::GridDatabase::mChunker