Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <sensor.h>
Classes | |
struct | Capability |
struct | ThreatLevel |
Public Types | |
typedef std::vector< Track > | TrackCollection |
Public Member Functions | |
Sensor (Unit *player) | |
Unit * | GetPlayer () const |
float | GetCloseRange () const |
float | GetMaxRange () const |
float | GetMaxCone () const |
float | GetLockCone () const |
bool | UseFriendFoe () const |
bool | UseObjectRecognition () const |
bool | UseThreatAssessment () const |
Track | CreateTrack (Unit *) const |
Track | CreateTrack (Unit *, const Vector &) const |
bool | IsTracking (const Track &) const |
bool | InsideNebula () const |
bool | InRange (const Track &) const |
const TrackCollection & | FindTracksInRange () const |
ThreatLevel::Value | IdentifyThreat (const Track &) const |
GFXColor | GetColor (const Track &) const |
Protected Attributes | |
Unit * | player |
float | closeRange |
TrackCollection | collection |
bool | useThreatAssessment |
typedef std::vector<Track> Radar::Sensor::TrackCollection |
Radar::Sensor::Sensor | ( | Unit * | player) |
Definition at line 25 of file sensor.cpp.
Definition at line 84 of file sensor.cpp.
References player.
Referenced by Radar::CollectRadarTracks::acquire().
Definition at line 91 of file sensor.cpp.
References player.
const Sensor::TrackCollection & Radar::Sensor::FindTracksInRange | ( | ) | const |
Definition at line 191 of file sensor.cpp.
References _Universe, Universe::activeStarSystem(), collection, StarSystem::collidemap, UnitCollection::constIterator(), findObjects(), UnitUtil::getDistance(), GetMaxRange(), VegaConfig::getVariable(), StarSystem::gravitationalUnits(), i, is_null(), Unit::location, XMLSupport::parse_bool(), XMLSupport::parse_float(), player, Unit::Target(), Unit::UNIT_ONLY, and vs_config.
Referenced by Radar::SphereDisplay::Draw(), Radar::BubbleDisplay::Draw(), and Radar::PlaneDisplay::Draw().
float Radar::Sensor::GetCloseRange | ( | ) | const |
Definition at line 58 of file sensor.cpp.
References closeRange.
Referenced by Radar::PlaneDisplay::DrawDistant(), and Radar::PlaneDisplay::DrawNear().
Definition at line 272 of file sensor.cpp.
References Radar::Track::Type::Base, Radar::Track::Type::CapitalShip, Radar::Track::Type::Cargo, Radar::Track::Type::DeadPlanet, Radar::Track::Relation::Enemy, Radar::Track::Relation::Friend, Radar::Track::GetRelation(), Radar::Track::GetType(), Radar::Track::HasLock(), IdentifyThreat(), Radar::Track::Type::JumpPoint, Radar::Track::Type::Missile, Radar::Track::Type::Nebula, Radar::Sensor::ThreatLevel::None, Radar::Track::Type::Planet, player, RetrColor(), Radar::Track::Type::Ship, Radar::Track::Type::Star, UseFriendFoe(), UseObjectRecognition(), and UseThreatAssessment().
Referenced by Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), and Radar::PlaneDisplay::DrawTrack().
float Radar::Sensor::GetLockCone | ( | ) | const |
Definition at line 77 of file sensor.cpp.
References Unit::GetComputerData(), Unit::Computer::RADARLIM::lockcone, player, and Unit::Computer::radar.
Referenced by Radar::PlaneDisplay::DrawGround().
float Radar::Sensor::GetMaxCone | ( | ) | const |
Definition at line 70 of file sensor.cpp.
References Unit::GetComputerData(), Unit::Computer::RADARLIM::maxcone, player, and Unit::Computer::radar.
float Radar::Sensor::GetMaxRange | ( | ) | const |
Definition at line 63 of file sensor.cpp.
References Unit::GetComputerData(), Unit::Computer::RADARLIM::maxrange, player, and Unit::Computer::radar.
Referenced by Radar::PlaneDisplay::DrawDistant(), Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), FindTracksInRange(), and InRange().
Unit * Radar::Sensor::GetPlayer | ( | ) | const |
Definition at line 32 of file sensor.cpp.
References player.
Referenced by Radar::SphereDisplay::DrawBackground().
Sensor::ThreatLevel::Value Radar::Sensor::IdentifyThreat | ( | const Track & | track) | const |
Definition at line 230 of file sensor.cpp.
References Radar::Track::Type::CapitalShip, Radar::Track::Relation::Enemy, Radar::Track::GetRelation(), Radar::Track::GetType(), Radar::Track::HasTurrets(), Radar::Track::HasWeaponLock(), Radar::Track::HasWeapons(), Radar::Sensor::ThreatLevel::High, Radar::Track::IsExploding(), Radar::Sensor::ThreatLevel::Low, Radar::Sensor::ThreatLevel::Medium, Radar::Track::Type::Missile, Radar::Sensor::ThreatLevel::None, player, Radar::Track::Type::Ship, and UseThreatAssessment().
Referenced by Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), Radar::PlaneDisplay::DrawTrack(), and GetColor().
Definition at line 112 of file sensor.cpp.
References Radar::Track::GetDistance(), and GetMaxRange().
bool Radar::Sensor::InsideNebula | ( | ) | const |
Definition at line 105 of file sensor.cpp.
References Unit::GetNebula(), and player.
Referenced by Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), and Radar::PlaneDisplay::DrawTrack().
Definition at line 98 of file sensor.cpp.
References player, Radar::Track::target, and Unit::Target().
Referenced by Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), and Radar::PlaneDisplay::DrawTrack().
bool Radar::Sensor::UseFriendFoe | ( | ) | const |
Definition at line 37 of file sensor.cpp.
References Unit::GetComputerData(), player, Unit::Computer::radar, and Unit::Computer::RADARLIM::UseFriendFoe().
Referenced by GetColor().
bool Radar::Sensor::UseObjectRecognition | ( | ) | const |
Definition at line 44 of file sensor.cpp.
References Unit::GetComputerData(), player, Unit::Computer::radar, and Unit::Computer::RADARLIM::UseObjectRecognition().
Referenced by Radar::PlaneDisplay::DrawTrack(), and GetColor().
bool Radar::Sensor::UseThreatAssessment | ( | ) | const |
Definition at line 51 of file sensor.cpp.
References Unit::GetComputerData(), player, Unit::Computer::radar, and Unit::Computer::RADARLIM::UseThreatAssessment().
Referenced by Radar::SphereDisplay::DrawTrack(), Radar::BubbleDisplay::DrawTrack(), Radar::PlaneDisplay::DrawTrack(), GetColor(), and IdentifyThreat().
|
protected |
Definition at line 76 of file sensor.h.
Referenced by GetCloseRange().
|
mutableprotected |
Definition at line 77 of file sensor.h.
Referenced by FindTracksInRange().
|
protected |
Definition at line 75 of file sensor.h.
Referenced by CreateTrack(), FindTracksInRange(), GetColor(), GetLockCone(), GetMaxCone(), GetMaxRange(), GetPlayer(), IdentifyThreat(), InsideNebula(), IsTracking(), UseFriendFoe(), UseObjectRecognition(), and UseThreatAssessment().