Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
LandingGear Class Reference

#include <LandingGear.h>

Inheritance diagram for LandingGear:
System

List of all members.

Public Types

enum  CONSTANTS { MAX_GEAR = 4 }
enum  GEAR_STATE { GEAR_UP, GEAR_LOWER, GEAR_DOWN, GEAR_RAISE }
- Public Types inherited from System
enum  CATEGORY {
  MISC_SYSTEM = 0, DRIVE = 1, WEAPON, SHIELD,
  SENSOR, COMPUTER, POWER_SOURCE, FLIGHT_DECK,
  FARCASTER
}
enum  STATUS {
  DESTROYED, CRITICAL, DEGRADED, NOMINAL,
  MAINT
}
enum  POWER_FLAGS { POWER_WATTS = 1, POWER_CRITICAL = 2 }

Public Member Functions

 LandingGear ()
 LandingGear (const LandingGear &rhs)
virtual ~LandingGear ()
virtual int AddGear (Model *m, const Point &s, const Point &e)
virtual void ExecFrame (double seconds)
virtual void Orient (const Physical *rep)
GEAR_STATE GetState () const
void SetState (GEAR_STATE s)
int NumGear () const
SolidGetGear (int i)
Point GetGearStop (int i)
double GetTouchDown ()
double GetClearance () const
- Public Member Functions inherited from System
 System (CATEGORY t, int s, const char *n, int maxv, double energy=0, double capacity=100, double sink_rate=1)
 System (const System &s)
virtual ~System ()
int operator== (const System &s) const
CATEGORY Type () const
int Subtype () const
const char * Name () const
const char * Abbreviation () const
void SetName (const char *n)
void SetAbbreviation (const char *a)
void SetDesign (SystemDesign *d)
virtual int Value () const
int MaxValue () const
STATUS Status () const
double Availability () const
double Safety () const
double Stability () const
virtual void CalcStatus ()
virtual void Repair ()
double NetAvail () const
void SetNetAvail (double d)
List< Component > & GetComponents ()
virtual void ApplyDamage (double damage)
virtual void ExecMaintFrame (double seconds)
virtual void DoEMCON (int emcon)
virtual void Mount (Point loc, float radius, float hull_factor=0.5f)
virtual void Mount (const System &system)
Point MountLocation () const
double Radius () const
double HullProtection () const
bool IsPowerCritical () const
bool UsesWatts () const
virtual double GetRequest (double seconds) const
virtual void Distribute (double delivered_energy, double seconds)
int GetSourceIndex () const
void SetSourceIndex (int i)
virtual int Charge () const
bool IsPowerOn () const
virtual void PowerOn ()
virtual void PowerOff ()
virtual double GetPowerLevel () const
virtual void SetPowerLevel (double level)
virtual void SetOverride (bool over)
virtual void DrainPower (double to_level)
void SetCapacity (double c)
double GetCapacity () const
double GetEnergy () const
double GetSinkRate () const
void SetEMCONPower (int emcon, int power_level)
int GetEMCONPower (int emcon)
int GetExplosionType () const
void SetExplosionType (int t)
ShipGetShip () const
void SetShip (Ship *s)
int GetID () const
void SetID (int n)

Static Public Member Functions

static void Initialize ()
static void Close ()
- Static Public Member Functions inherited from System
static const char * TYPENAME ()

Protected Attributes

GEAR_STATE state
double transit
double clearance
int ngear
Modelmodels [MAX_GEAR]
Solidgear [MAX_GEAR]
Point start [MAX_GEAR]
Point end [MAX_GEAR]
- Protected Attributes inherited from System
CATEGORY type
Shipship
int id
int subtype
int max_value
Text name
Text abrv
STATUS status
float crit_level
float availability
float safety
float stability
float safety_overload
float net_avail
Point mount_loc
Point mount_rel
float radius
float hull_factor
float energy
float capacity
float sink_rate
float power_level
int source_index
DWORD power_flags
bool power_on
BYTE emcon_power [3]
BYTE emcon
int explosion_type
SystemDesigndesign
List< Componentcomponents

Detailed Description

Definition at line 28 of file LandingGear.h.


Member Enumeration Documentation

Enumerator:
MAX_GEAR 

Definition at line 31 of file LandingGear.h.

Enumerator:
GEAR_UP 
GEAR_LOWER 
GEAR_DOWN 
GEAR_RAISE 

Definition at line 32 of file LandingGear.h.


Constructor & Destructor Documentation

LandingGear::LandingGear ( )

Definition at line 31 of file LandingGear.cpp.

LandingGear::LandingGear ( const LandingGear rhs)

Definition at line 46 of file LandingGear.cpp.

LandingGear::~LandingGear ( )
virtual

Definition at line 76 of file LandingGear.cpp.


Member Function Documentation

int LandingGear::AddGear ( Model m,
const Point s,
const Point e 
)
virtual

Definition at line 115 of file LandingGear.cpp.

void LandingGear::Close ( )
static

Definition at line 106 of file LandingGear.cpp.

void LandingGear::ExecFrame ( double  seconds)
virtual

Reimplemented from System.

Definition at line 151 of file LandingGear.cpp.

double LandingGear::GetClearance ( ) const
inline

Definition at line 48 of file LandingGear.h.

Solid * LandingGear::GetGear ( int  i)

Definition at line 231 of file LandingGear.cpp.

Point LandingGear::GetGearStop ( int  i)

Definition at line 244 of file LandingGear.cpp.

GEAR_STATE LandingGear::GetState ( ) const
inline

Definition at line 42 of file LandingGear.h.

double LandingGear::GetTouchDown ( )

Definition at line 259 of file LandingGear.cpp.

void LandingGear::Initialize ( )
static

Definition at line 94 of file LandingGear.cpp.

int LandingGear::NumGear ( ) const
inline

Definition at line 44 of file LandingGear.h.

void LandingGear::Orient ( const Physical rep)
virtual

Reimplemented from System.

Definition at line 208 of file LandingGear.cpp.

void LandingGear::SetState ( GEAR_STATE  s)

Definition at line 131 of file LandingGear.cpp.


Member Data Documentation

double LandingGear::clearance
protected

Definition at line 56 of file LandingGear.h.

Point LandingGear::end[MAX_GEAR]
protected

Definition at line 62 of file LandingGear.h.

Solid* LandingGear::gear[MAX_GEAR]
protected

Definition at line 60 of file LandingGear.h.

Model* LandingGear::models[MAX_GEAR]
protected

Definition at line 59 of file LandingGear.h.

int LandingGear::ngear
protected

Definition at line 58 of file LandingGear.h.

Point LandingGear::start[MAX_GEAR]
protected

Definition at line 61 of file LandingGear.h.

GEAR_STATE LandingGear::state
protected

Definition at line 54 of file LandingGear.h.

double LandingGear::transit
protected

Definition at line 55 of file LandingGear.h.


The documentation for this class was generated from the following files: