class Geo GeoSpatialHash

This is the documentation for Enlighten.

class Geo GeoSpatialHash

class Geo::GeoSpatialHash

The 3D hash table.

Classes

Name

Description

Name

Description

Geo::GeoSpatialHash::GridCellBlock

The grid index box.

Variables

Name

Description

Name

Description

Geo::s32 m_Capacity

The capacity of the grid.

Geo::s32 * m_CellOffsets

This is the number of items in each cell.

Geo::GeoArray< GeoSpatialHashEntry > m_CellRefs

This is of size n, where n is the number of items.

Geo::v128 m_CellSize

The size of each cell. Divide by this to convert to voxel space.

Geo::s32 m_GridCells[3]

The grid discrete size.

Geo::v128 m_GridExtents

The grid extents.

Geo::v128 m_GridOffset

The grid offset. Add something this to a vector to get it into grid space.

Geo::s32 m_NumCells

This the number of cells.

bool m_Sorted

Has this been prepared?

Functions

Name

Description

Name

Description

~GeoSpatialHash()

Destructor.

AddInBounds(const Geo::GeoBoundingBox &, Geo::s32)

Add an object to an extent.

GeoSpatialHash(const Geo::GeoBoundingBox &, Geo::u32, Geo::u32, Geo::u32, Geo::u32)

Constructor. CellCount is how many cells along each axis there should be.

GetBaseKey(Geo::u32, Geo::u32, Geo::u32)

Get the base key.

GetGridCellBlock(const Geo::GeoBoundingBox &, GridCellBlock &)

Convert a bbox to GridIndexBox.

GetInExtent(const Geo::GeoBoundingBox &, Geo::GeoArray< Geo::s32 > &)

Get the list of objects inside a given bounding box.

GetObjectsInCell(Geo::u32, Geo::GeoArray< Geo::s32 > &)

Get all the objects inside a given cell.

PrepareMap()

Once you've added all the vertices, call this.

QSortComparison(const void *, const void *)

Function used by qsort to compare map entries.

TransformPoint(const Geo::v128 &)

Transform a point into our voxel space.



Geo::GeoSpatialHash::~GeoSpatialHash


public: ~GeoSpatialHash()


Destructor.



bool Geo::GeoSpatialHash::AddInBounds


public: bool AddInBounds
(
    const Geo::GeoBoundingBox & bbox,
    Geo::s32 vertex
)