Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <collide_map.h>
Classes | |
class | CollidableBackref |
Public Types | |
typedef Collidable * | iterator |
typedef std::vector< Collidable > | ResizableArray |
Public Member Functions | |
void | SetLocationIndex (unsigned int li) |
bool | Iterable (iterator) |
void | UpdateBoltInfo (iterator iter, Collidable::CollideRef ref) |
void | flatten () |
void | flatten (CollideArray &example) |
iterator | insert (const Collidable &newKey, iterator hint) |
iterator | insert (const Collidable &newKey) |
iterator | changeKey (iterator iter, const Collidable &newKey) |
iterator | changeKey (iterator iter, const Collidable &newKey, iterator tless, iterator tmore) |
iterator | begin () |
iterator | end () |
iterator | lower_bound (const Collidable &) |
void | erase (iterator iter) |
void | checkSet () |
CollideArray (unsigned int location_index) | |
Public Attributes | |
std::vector< float > | max_radius |
unsigned int | location_index |
ResizableArray | sorted |
ResizableArray | unsorted |
std::vector< std::list < CollidableBackref > > | toflattenhints |
unsigned int | count |
Static Public Attributes | |
static float | max_bolt_radius = 0 |
Definition at line 86 of file collide_map.h.
typedef Collidable* CollideArray::iterator |
Definition at line 110 of file collide_map.h.
typedef std::vector< Collidable > CollideArray::ResizableArray |
Definition at line 112 of file collide_map.h.
|
inline |
Definition at line 135 of file collide_map.h.
References location_index.
|
inline |
Definition at line 124 of file collide_map.h.
References sorted.
Referenced by GameCockpit::AutoLanding(), Mission::call_unit_launch(), changeKey(), CollideChecker< T, canbebolt >::CheckCollisions(), CollideChecker< T, canbebolt >::CheckCollisionsInner(), checkSet(), end(), erase(), findObjectsFromPosition(), flatten(), insert(), Iterable(), lower_bound(), Unit::RemoveFromSystem(), and UpdateBoltInfo().
CollideArray::iterator CollideArray::changeKey | ( | CollideArray::iterator | iter, |
const Collidable & | newKey | ||
) |
Definition at line 44 of file collide_map.cpp.
References begin(), end(), and unsorted.
Referenced by changeKey(), and Bolt::Update().
CollideArray::iterator CollideArray::changeKey | ( | CollideArray::iterator | iter, |
const Collidable & | newKey, | ||
CollideArray::iterator | tless, | ||
CollideArray::iterator | tmore | ||
) |
Definition at line 55 of file collide_map.cpp.
References changeKey().
void CollideArray::checkSet | ( | ) |
Definition at line 240 of file collide_map.cpp.
References begin(), and end().
Referenced by Unit::RemoveFromSystem().
|
inline |
Definition at line 128 of file collide_map.h.
References begin(), and sorted.
Referenced by GameCockpit::AutoLanding(), changeKey(), CollideChecker< T, canbebolt >::CheckCollisions(), CollideChecker< T, canbebolt >::CheckCollisionsInner(), checkSet(), erase(), findObjectsFromPosition(), CommunicatingAI::GetRandomUnit(), insert(), Iterable(), lower_bound(), Unit::RemoveFromSystem(), and UpdateBoltInfo().
void CollideArray::erase | ( | iterator | iter) |
Definition at line 8 of file collide_map.cpp.
References begin(), count, end(), i, Collidable::radius, Collidable::ref, toflattenhints, CollideArray::CollidableBackref::toflattenhints_offset, Collidable::CollideRef::unit, and unsorted.
Referenced by BoltDestroyGeneric(), Unit::RemoveFromSystem(), and StarSystem::RemoveUnit().
void CollideArray::flatten | ( | ) |
Definition at line 121 of file collide_map.cpp.
References begin(), count, f, vsalg::for_each(), i, index, j, location_index, max_radius, size, sorted, toflattenhints, Unit::UNIT_BOLT, Unit::UNIT_ONLY, and unsorted.
Referenced by flatten(), and StarSystem::UpdateUnitPhysics().
void CollideArray::flatten | ( | CollideArray & | example) |
Definition at line 197 of file collide_map.cpp.
References count, flatten(), vsalg::for_each(), location_index, sorted, toflattenhints, and Unit::UNIT_ONLY.
CollideArray::iterator CollideArray::insert | ( | const Collidable & | newKey, |
iterator | hint | ||
) |
Definition at line 211 of file collide_map.cpp.
References begin(), count, end(), max_bolt_radius, Collidable::radius, SIMULATION_ATOM, sorted, toflattenhints, and unsorted.
Referenced by Bolt::Bolt(), Unit::CollideAll(), insert(), and Unit::UpdateCollideQueue().
CollideArray::iterator CollideArray::insert | ( | const Collidable & | newKey) |
Definition at line 236 of file collide_map.cpp.
References insert(), and lower_bound().
bool CollideArray::Iterable | ( | CollideArray::iterator | a) |
Definition at line 255 of file collide_map.cpp.
References begin(), and end().
Referenced by CollideChecker< T, canbebolt >::CheckCollisions(), and findObjectsFromPosition().
CollideArray::iterator CollideArray::lower_bound | ( | const Collidable & | newKey) |
Definition at line 231 of file collide_map.cpp.
References begin(), and end().
Referenced by GameStarSystem::Draw(), CommunicatingAI::GetRandomUnit(), and insert().
|
inline |
Definition at line 106 of file collide_map.h.
References location_index.
void CollideArray::UpdateBoltInfo | ( | CollideArray::iterator | iter, |
Collidable::CollideRef | ref | ||
) |
Definition at line 35 of file collide_map.cpp.
References begin(), end(), is_null(), and unsorted.
Referenced by BoltDestroyGeneric().
unsigned int CollideArray::count |
Definition at line 116 of file collide_map.h.
unsigned int CollideArray::location_index |
Definition at line 92 of file collide_map.h.
Referenced by CollideArray(), flatten(), and SetLocationIndex().
|
static |
Definition at line 89 of file collide_map.h.
Referenced by insert(), and RadiusUpdate< direction, always_replace >::operator()().
std::vector< float > CollideArray::max_radius |
Definition at line 91 of file collide_map.h.
Referenced by CollideChecker< T, canbebolt >::ComputeMaxLookMinLook(), flatten(), and RadiusUpdate< direction, always_replace >::operator()().
ResizableArray CollideArray::sorted |
Definition at line 113 of file collide_map.h.
Referenced by begin(), StarSystem::Statistics::CheckVitals(), end(), flatten(), insert(), and Bolt::UpdatePhysics().
std::vector< std::list< CollidableBackref > > CollideArray::toflattenhints |
Definition at line 115 of file collide_map.h.
Referenced by erase(), flatten(), insert(), and Bolt::UpdatePhysics().
ResizableArray CollideArray::unsorted |
Definition at line 114 of file collide_map.h.
Referenced by changeKey(), erase(), flatten(), insert(), and UpdateBoltInfo().