Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "gfx/vec.h"
#include <algorithm>
#include <vector>
#include <stdio.h>
#include <assert.h>
#include "linecollide.h"
#include "collection.h"
#include "cmd/unit_generic.h"
#include <set>
Go to the source code of this file.
Classes | |
class | UnitHash3d< CTSIZ, CTACCURACY, CTHUGE > |
class | CollideTable |
struct | collideTrees |
Macros | |
#define | SAFE_COLLIDE_DEBUG |
#define | COLLIDETABLESIZE sizeof (CTSIZ) |
#define | COLLIDETABLEACCURACY sizeof (CTACCURACY) |
#define | HUGEOBJECT sizeof (CTHUGE) |
objects that go over 16 sectors are considered huge and better to check against everything. More... | |
Functions | |
void | AddCollideQueue (LineCollide &, StarSystem *ss) |
bool | TableLocationChanged (const QVector &, const QVector &) |
bool | TableLocationChanged (const LineCollide &, const QVector &, const QVector &) |
void | KillCollideTable (LineCollide *lc, StarSystem *ss) |
bool | EradicateCollideTable (LineCollide *lc, StarSystem *ss) |
Variables | |
const int | tablehuge = 27 |
const int | coltableacc = 128 |
const int | coltablesize = 20 |
const unsigned int | collideTreesMaxTrees = 16 |
#define COLLIDETABLEACCURACY sizeof (CTACCURACY) |
Definition at line 15 of file unit_collide.h.
Referenced by Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Get(), UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Get(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::hash_int(), UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::hash_int(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Put(), UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Put(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Remove(), and UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Remove().
#define COLLIDETABLESIZE sizeof (CTSIZ) |
Definition at line 14 of file unit_collide.h.
Referenced by Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Clear(), UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Clear(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Eradicate(), UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Eradicate(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::hash_int(), and UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::hash_int().
#define HUGEOBJECT sizeof (CTHUGE) |
objects that go over 16 sectors are considered huge and better to check against everything.
Definition at line 17 of file unit_collide.h.
Referenced by Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Get(), UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Get(), Hashtable3d< T, COLLIDETABLESIZE, COLLIDETABLEACCURACY, HUGEOBJECT >::Put(), and UnitHash3d< char[coltablesize], char[coltableacc], char[tablehuge] >::Put().
#define SAFE_COLLIDE_DEBUG |
Definition at line 4 of file unit_collide.h.
void AddCollideQueue | ( | LineCollide & | , |
StarSystem * | ss | ||
) |
Definition at line 108 of file collide.cpp.
References CollideTable::c, StarSystem::collidetable, LineCollide::object, UnitHash3d< CTSIZ, CTACCURACY, CTHUGE >::Put(), LineCollide::type, and LineCollide::UNIT.
Referenced by Beam::UpdatePhysics().
bool EradicateCollideTable | ( | LineCollide * | lc, |
StarSystem * | ss | ||
) |
Definition at line 98 of file collide.cpp.
References CollideTable::c, StarSystem::collidetable, UnitHash3d< CTSIZ, CTACCURACY, CTHUGE >::Eradicate(), LineCollide::object, LineCollide::type, and LineCollide::UNIT.
void KillCollideTable | ( | LineCollide * | lc, |
StarSystem * | ss | ||
) |
Definition at line 90 of file collide.cpp.
References CollideTable::c, StarSystem::collidetable, LineCollide::object, UnitHash3d< CTSIZ, CTACCURACY, CTHUGE >::Remove(), LineCollide::type, and LineCollide::UNIT.
Definition at line 75 of file collide.cpp.
References _Universe, Universe::activeStarSystem(), CollideTable::c, StarSystem::collidetable, and UnitHash3d< CTSIZ, CTACCURACY, CTHUGE >::hash_int().
Referenced by TableLocationChanged(), and Beam::UpdatePhysics().
bool TableLocationChanged | ( | const LineCollide & | , |
const QVector & | , | ||
const QVector & | |||
) |
Definition at line 85 of file collide.cpp.
References LineCollide::Maxi, LineCollide::Mini, and TableLocationChanged().
const unsigned int collideTreesMaxTrees = 16 |
Definition at line 273 of file unit_collide.h.
Referenced by collideTrees::collideTrees(), collideTrees::colTree(), collideTrees::Dec(), and Unit::LoadRow().
const int coltableacc = 128 |
Definition at line 252 of file unit_collide.h.
Referenced by Beam::UpdatePhysics().
const int coltablesize = 20 |
Definition at line 253 of file unit_collide.h.
const int tablehuge = 27 |
Definition at line 251 of file unit_collide.h.
Referenced by Beam::UpdatePhysics().