SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GridSectorizer Class Reference

`#include <slikenet/GridSectorizer.h>`

## Public Member Functions

| GridSectorizer ()
| ~GridSectorizer ()
void | Init (const float _maxCellWidth, const float _maxCellHeight, const float minX, const float minY, const float maxX, const float maxY)
void | AddEntry (void *entry, const float minX, const float minY, const float maxX, const float maxY)
void | GetEntries (DataStructures::List< void * > &intersectionList, const float minX, const float minY, const float maxX, const float maxY)
void | Clear (void)

## Protected Member Functions

int | WorldToCellX (const float input) const
int | WorldToCellY (const float input) const
int | WorldToCellXOffsetAndClamped (const float input) const
int | WorldToCellYOffsetAndClamped (const float input) const
bool | PositionCrossesCells (const float originX, const float originY, const float destinationX, const float destinationY) const

## Protected Attributes

float | cellOriginX
float | cellOriginY
float | cellWidth
float | cellHeight
float | invCellWidth
float | invCellHeight
float | gridWidth
float | gridHeight
int | gridCellWidthCount
int | gridCellHeightCount
DataStructures::List< void * > * | grid

## Detailed Description

Definition at line 29 of file GridSectorizer.h.

## Constructor & Destructor Documentation

GridSectorizer::GridSectorizer | ( |  | ) |

Definition at line 21 of file GridSectorizer.cpp.

References grid.

GridSectorizer::~GridSectorizer | ( |  | ) |

Definition at line 25 of file GridSectorizer.cpp.

References _FILE_AND_LINE_, grid, and SLNet::OP_DELETE_ARRAY().

## Member Function Documentation

void GridSectorizer::AddEntry | ( | void * | entry,
|  | const float | minX,
|  | const float | minY,
|  | const float | maxX,
|  | const float | maxY
| ) |  |

Definition at line 55 of file GridSectorizer.cpp.

References _FILE_AND_LINE_, cellWidth, grid, gridCellWidthCount, DataStructures::List< list_type >::Insert(), RakAssert, WorldToCellXOffsetAndClamped(), and WorldToCellYOffsetAndClamped().

void GridSectorizer::Clear | ( | void |  | ) |

Definition at line 200 of file GridSectorizer.cpp.

References _FILE_AND_LINE_, grid, gridCellHeightCount, and gridCellWidthCount.

void GridSectorizer::GetEntries | ( | DataStructures::List< void * > & | intersectionList,
|  | const float | minX,
|  | const float | minY,
|  | const float | maxX,
|  | const float | maxY
| ) |  |

Definition at line 149 of file GridSectorizer.cpp.

References _FILE_AND_LINE_, DataStructures::List< list_type >::Clear(), grid, gridCellWidthCount, DataStructures::List< list_type >::Insert(), DataStructures::List< list_type >::Size(), WorldToCellXOffsetAndClamped(), and WorldToCellYOffsetAndClamped().

void GridSectorizer::Init | ( | const float | _maxCellWidth,
|  | const float | _maxCellHeight,
|  | const float | minX,
|  | const float | minY,
|  | const float | maxX,
|  | const float | maxY
| ) |  |

Definition at line 30 of file GridSectorizer.cpp.

References _FILE_AND_LINE_, cellHeight, cellOriginX, cellOriginY, cellWidth, grid, gridCellHeightCount, gridCellWidthCount, gridHeight, gridWidth, DataStructures::OrderedList< key_type, data_type, default_comparison_function >::IMPLEMENT_DEFAULT_COMPARISON(), invCellHeight, invCellWidth, SLNet::OP_DELETE_ARRAY(), and RakAssert.

bool GridSectorizer::PositionCrossesCells | ( | const float | originX,
|  | const float | originY,
|  | const float | destinationX,
|  | const float | destinationY
| ) |  | const

protected

Definition at line 174 of file GridSectorizer.cpp.

References cellHeight, and cellWidth.

int GridSectorizer::WorldToCellX | ( | const float | input | ) | const

protected

Definition at line 178 of file GridSectorizer.cpp.

References cellOriginX, and invCellWidth.

Referenced by WorldToCellXOffsetAndClamped().

int GridSectorizer::WorldToCellXOffsetAndClamped | ( | const float | input | ) | const

protected

Definition at line 186 of file GridSectorizer.cpp.

References gridCellWidthCount, and WorldToCellX().

Referenced by AddEntry(), and GetEntries().

int GridSectorizer::WorldToCellY | ( | const float | input | ) | const

protected

Definition at line 182 of file GridSectorizer.cpp.

References cellOriginY, and invCellHeight.

Referenced by WorldToCellYOffsetAndClamped().

int GridSectorizer::WorldToCellYOffsetAndClamped | ( | const float | input | ) | const

protected

Definition at line 193 of file GridSectorizer.cpp.

References gridCellHeightCount, and WorldToCellY().

Referenced by AddEntry(), and GetEntries().

## Member Data Documentation

float GridSectorizer::cellHeight

protected

Definition at line 68 of file GridSectorizer.h.

Referenced by Init(), and PositionCrossesCells().

float GridSectorizer::cellOriginX

protected

Definition at line 67 of file GridSectorizer.h.

Referenced by Init(), and WorldToCellX().

float GridSectorizer::cellOriginY

protected

Definition at line 67 of file GridSectorizer.h.

Referenced by Init(), and WorldToCellY().

float GridSectorizer::cellWidth

protected

Definition at line 68 of file GridSectorizer.h.

Referenced by AddEntry(), Init(), and PositionCrossesCells().

DataStructures::List<void*>* GridSectorizer::grid

protected

Definition at line 79 of file GridSectorizer.h.

Referenced by AddEntry(), Clear(), GetEntries(), GridSectorizer(), Init(), and ~GridSectorizer().

int GridSectorizer::gridCellHeightCount

protected

Definition at line 71 of file GridSectorizer.h.

Referenced by Clear(), Init(), and WorldToCellYOffsetAndClamped().

int GridSectorizer::gridCellWidthCount

protected

Definition at line 71 of file GridSectorizer.h.

Referenced by AddEntry(), Clear(), GetEntries(), Init(), and WorldToCellXOffsetAndClamped().

float GridSectorizer::gridHeight

protected

Definition at line 70 of file GridSectorizer.h.

Referenced by Init().

float GridSectorizer::gridWidth

protected

Definition at line 70 of file GridSectorizer.h.

Referenced by Init().

float GridSectorizer::invCellHeight

protected

Definition at line 69 of file GridSectorizer.h.

Referenced by Init(), and WorldToCellY().

float GridSectorizer::invCellWidth

protected

Definition at line 69 of file GridSectorizer.h.

Referenced by Init(), and WorldToCellX().

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

- Source/include/slikenet/GridSectorizer.h
- Source/src/GridSectorizer.cpp