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

#include <Thruster.h>

Inheritance diagram for Thruster:
System

List of all members.

Public Types

enum  Constants {
  LEFT, RIGHT, FORE, AFT,
  TOP, BOTTOM, YAW_L, YAW_R,
  PITCH_D, PITCH_U, ROLL_L, ROLL_R
}
- 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

 Thruster (int dtype, double thrust, float flare_scale=0)
 Thruster (const Thruster &rhs)
virtual ~Thruster ()
virtual void ExecFrame (double seconds)
virtual void ExecTrans (double x, double y, double z)
virtual void SetShip (Ship *s)
virtual double TransXLimit ()
virtual double TransYLimit ()
virtual double TransZLimit ()
virtual void AddPort (int type, const Point &loc, DWORD fire, float flare_scale=0)
virtual void CreatePort (int type, const Point &loc, DWORD fire, float flare_scale)
int NumThrusters () const
GraphicFlare (int engine) const
GraphicTrail (int engine) const
virtual void Orient (const Physical *rep)
virtual double GetRequest (double seconds) 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 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
int GetID () const
void SetID (int n)

Static Public Member Functions

static const char * TYPENAME ()
static void Initialize ()
static void Close ()

Protected Member Functions

void IncBurn (int inc, int dec)
void DecBurn (int a, int b)

Protected Attributes

Shipship
float thrust
float scale
float burn [12]
float avail_x
float avail_y
float avail_z
float trans_x
float trans_y
float trans_z
float roll_rate
float pitch_rate
float yaw_rate
float roll_drag
float pitch_drag
float yaw_drag
List< ThrusterPortports
- Protected Attributes inherited from System
CATEGORY type
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 45 of file Thruster.h.


Member Enumeration Documentation

Enumerator:
LEFT 
RIGHT 
FORE 
AFT 
TOP 
BOTTOM 
YAW_L 
YAW_R 
PITCH_D 
PITCH_U 
ROLL_L 
ROLL_R 

Definition at line 50 of file Thruster.h.


Constructor & Destructor Documentation

Thruster::Thruster ( int  dtype,
double  thrust,
float  flare_scale = 0 
)

Definition at line 64 of file Thruster.cpp.

Thruster::Thruster ( const Thruster rhs)

Definition at line 84 of file Thruster.cpp.

Thruster::~Thruster ( )
virtual

Definition at line 104 of file Thruster.cpp.


Member Function Documentation

void Thruster::AddPort ( int  type,
const Point loc,
DWORD  fire,
float  flare_scale = 0 
)
virtual

Definition at line 502 of file Thruster.cpp.

void Thruster::Close ( )
static

Definition at line 139 of file Thruster.cpp.

void Thruster::CreatePort ( int  type,
const Point loc,
DWORD  fire,
float  flare_scale 
)
virtual

Definition at line 510 of file Thruster.cpp.

void Thruster::DecBurn ( int  a,
int  b 
)
protected

Definition at line 570 of file Thruster.cpp.

void Thruster::ExecFrame ( double  seconds)
virtual

Reimplemented from System.

Definition at line 212 of file Thruster.cpp.

void Thruster::ExecTrans ( double  x,
double  y,
double  z 
)
virtual

Definition at line 339 of file Thruster.cpp.

Graphic * Thruster::Flare ( int  engine) const

Definition at line 538 of file Thruster.cpp.

double Thruster::GetRequest ( double  seconds) const
virtual

Reimplemented from System.

Definition at line 584 of file Thruster.cpp.

void Thruster::IncBurn ( int  inc,
int  dec 
)
protected

Definition at line 558 of file Thruster.cpp.

void Thruster::Initialize ( )
static

Definition at line 116 of file Thruster.cpp.

int Thruster::NumThrusters ( ) const

Definition at line 532 of file Thruster.cpp.

void Thruster::Orient ( const Physical rep)
virtual

Reimplemented from System.

Definition at line 153 of file Thruster.cpp.

void Thruster::SetShip ( Ship s)
virtual

Reimplemented from System.

Definition at line 285 of file Thruster.cpp.

Graphic * Thruster::Trail ( int  engine) const

Definition at line 547 of file Thruster.cpp.

double Thruster::TransXLimit ( )
virtual

Definition at line 319 of file Thruster.cpp.

double Thruster::TransYLimit ( )
virtual

Definition at line 325 of file Thruster.cpp.

double Thruster::TransZLimit ( )
virtual

Definition at line 331 of file Thruster.cpp.

static const char* Thruster::TYPENAME ( )
inlinestatic

Reimplemented from System.

Definition at line 48 of file Thruster.h.


Member Data Documentation

float Thruster::avail_x
protected

Definition at line 88 of file Thruster.h.

float Thruster::avail_y
protected

Definition at line 88 of file Thruster.h.

float Thruster::avail_z
protected

Definition at line 88 of file Thruster.h.

float Thruster::burn[12]
protected

Definition at line 86 of file Thruster.h.

float Thruster::pitch_drag
protected

Definition at line 91 of file Thruster.h.

float Thruster::pitch_rate
protected

Definition at line 90 of file Thruster.h.

List<ThrusterPort> Thruster::ports
protected

Definition at line 93 of file Thruster.h.

float Thruster::roll_drag
protected

Definition at line 91 of file Thruster.h.

float Thruster::roll_rate
protected

Definition at line 90 of file Thruster.h.

float Thruster::scale
protected

Definition at line 85 of file Thruster.h.

Ship* Thruster::ship
protected

Reimplemented from System.

Definition at line 83 of file Thruster.h.

float Thruster::thrust
protected

Definition at line 84 of file Thruster.h.

float Thruster::trans_x
protected

Definition at line 89 of file Thruster.h.

float Thruster::trans_y
protected

Definition at line 89 of file Thruster.h.

float Thruster::trans_z
protected

Definition at line 89 of file Thruster.h.

float Thruster::yaw_drag
protected

Definition at line 91 of file Thruster.h.

float Thruster::yaw_rate
protected

Definition at line 90 of file Thruster.h.


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