Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
objects that go over 16 sectors are considered huge and better to check against everything. More...
#include <hashtable_3d.h>
Public Member Functions | |
int | hash_int (const double aye) |
Hashes a single value to a value on the collide table truncated to all 3d constraints. Consider using a swizzle. More... | |
void | Clear () |
clears entire table More... | |
int | Get (const QVector &Exact, std::vector< T > *retval[]) |
returns any objects residing in the sector occupied by Exact More... | |
std::vector< T > & | GetHuge () |
Returns all objects too big to be conveniently fit in the array. More... | |
int | Get (const LineCollide *target, std::vector< T > *retval[]) |
Returns all objects within sector(s) occupied by target. More... | |
void | Put (LineCollide *target, const T objectToPut) |
Adds objectToPut into collide table with limits specified by target. More... | |
bool | Eradicate (T objectToKill) |
bool | Remove (const LineCollide *target, T &objectToKill) |
Removes objectToKill from collide table with span of Target. More... | |
Static Public Member Functions | |
static bool | removeFromVector (std::vector< T > &myvector, T &objectToKill) |
objects that go over 16 sectors are considered huge and better to check against everything.
Hashtable3d is a 3d datastructure that holds various starships that are near enough to crash into each other (or also lights that are big enough to shine on nearby units.
Definition at line 20 of file hashtable_3d.h.
|
inline |
clears entire table
Definition at line 47 of file hashtable_3d.h.
References COLLIDETABLESIZE, and size.
|
inline |
Definition at line 161 of file hashtable_3d.h.
References COLLIDETABLESIZE, and Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::removeFromVector().
|
inline |
returns any objects residing in the sector occupied by Exact
Definition at line 57 of file hashtable_3d.h.
References Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::hash_int().
|
inline |
Returns all objects within sector(s) occupied by target.
Definition at line 71 of file hashtable_3d.h.
References COLLIDETABLEACCURACY, Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::hash_int(), LineCollide::hhuge, HUGEOBJECT, LineCollide::Maxi, maxx, maxy, maxz, LineCollide::Mini, x, and y.
|
inline |
Returns all objects too big to be conveniently fit in the array.
Definition at line 66 of file hashtable_3d.h.
|
inline |
Hashes a single value to a value on the collide table truncated to all 3d constraints. Consider using a swizzle.
Definition at line 40 of file hashtable_3d.h.
References COLLIDETABLEACCURACY, and COLLIDETABLESIZE.
Referenced by Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Get(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Put(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Remove(), and gfx_light::RemoveFromTable().
|
inline |
Adds objectToPut into collide table with limits specified by target.
Definition at line 106 of file hashtable_3d.h.
References COLLIDETABLEACCURACY, Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::hash_int(), LineCollide::hhuge, HUGEOBJECT, LineCollide::Maxi, maxx, maxy, maxz, LineCollide::Mini, minx, miny, minz, x, and y.
Referenced by gfx_light::AddToTable().
|
inline |
Removes objectToKill from collide table with span of Target.
Definition at line 171 of file hashtable_3d.h.
References COLLIDETABLEACCURACY, fprintf, Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::hash_int(), LineCollide::hhuge, LineCollide::Maxi, maxx, maxy, maxz, LineCollide::Mini, Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::removeFromVector(), x, and y.
Referenced by gfx_light::RemoveFromTable().
|
inlinestatic |
Definition at line 145 of file hashtable_3d.h.
Referenced by Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Eradicate(), and Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Remove().