Pioneer
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Propulsion Class Reference

#include <Propulsion.h>

Inheritance diagram for Propulsion:
Inheritance graph
[legend]
Collaboration diagram for Propulsion:
Collaboration graph
[legend]

Public Types

enum  FuelState { FUEL_OK , FUEL_WARNING , FUEL_EMPTY }
 

Public Member Functions

 Propulsion ()
 
virtual ~Propulsion ()
 
void Init (DynamicBody *b, SceneGraph::Model *m, const int tank_mass, const double effExVel, const float lin_Thrust[], const float ang_Thrust)
 
void Init (DynamicBody *b, SceneGraph::Model *m, const int tank_mass, const double effExVel, const float lin_Thrust[], const float ang_Thrust, const float lin_AccelerationCap[])
 
virtual void SaveToJson (Json &jsonObj, Space *space)
 
virtual void LoadFromJson (const Json &jsonObj, Space *space)
 
void SetThrustPowerMult (double p, const float lin_Thrust[], const float ang_Thrust)
 
void SetAccelerationCapMult (double p, const float lin_AccelerationCap[])
 
double GetThrust (Thruster thruster) const
 
vector3d GetThrust (const vector3d &dir) const
 
double GetThrustFwd () const
 
double GetThrustRev () const
 
double GetThrustUp () const
 
double GetThrustMin () const
 
vector3d GetThrustUncapped (const vector3d &dir) const
 
double GetAccel (Thruster thruster) const
 
double GetAccelFwd () const
 
double GetAccelRev () const
 
double GetAccelUp () const
 
double GetAccelMin () const
 
double ClampLinThrusterState (int axis, double level) const
 
vector3d ClampLinThrusterState (const vector3d &levels) const
 
void SetLinThrusterState (int axis, double level)
 
void SetLinThrusterState (const vector3d &levels)
 
void SetAngThrusterState (int axis, double level)
 
void SetAngThrusterState (const vector3d &levels)
 
vector3d GetLinThrusterState () const
 
vector3d GetAngThrusterState () const
 
void ClearLinThrusterState ()
 
void ClearAngThrusterState ()
 
vector3d GetActualLinThrust () const
 
vector3d GetActualAngThrust () const
 
FuelState GetFuelState () const
 
double GetFuel () const
 
double GetFuelReserve () const
 
void SetFuel (const double f)
 
void SetFuelReserve (const double f)
 
float GetFuelUseRate ()
 
double GetSpeedReachedWithFuel () const
 
float FuelTankMassLeft ()
 
void SetFuelTankMass (int fTank)
 
void UpdateFuel (const float timeStep)
 
bool IsFuelStateChanged ()
 
void Render (Graphics::Renderer *r, const Camera *camera, const vector3d &viewCoords, const matrix4x4d &viewTransform)
 
void AIModelCoordsMatchSpeedRelTo (const vector3d &v, const DynamicBody *other)
 
void AIAccelToModelRelativeVelocity (const vector3d &v)
 
bool AIMatchVel (const vector3d &vel, const vector3d &powerLimit=vector3d(1.0))
 
bool AIChangeVelBy (const vector3d &diffvel, const vector3d &powerLimit=vector3d(1.0))
 
vector3d AIChangeVelDir (const vector3d &diffvel)
 
void AIMatchAngVelObjSpace (const vector3d &angvel, const vector3d &powerLimit=vector3d(1.0), bool ignoreZeroValues=false)
 
double AIFaceUpdir (const vector3d &updir, double av=0)
 
double AIFaceDirection (const vector3d &dir, double av=0)
 
vector3d AIGetLeadDir (const Body *target, const vector3d &targaccel, double projspeed)
 
- Public Member Functions inherited from RefCounted
 RefCounted ()
 
virtual ~RefCounted ()
 
void IncRefCount () const
 
void DecRefCount () const
 
int GetRefCount () const
 
- Public Member Functions inherited from LuaWrappable
virtual ~LuaWrappable ()
 

Member Enumeration Documentation

◆ FuelState

Enumerator
FUEL_OK 
FUEL_WARNING 
FUEL_EMPTY 

Constructor & Destructor Documentation

◆ Propulsion()

Propulsion::Propulsion ( )

◆ ~Propulsion()

virtual Propulsion::~Propulsion ( )
inlinevirtual

Member Function Documentation

◆ AIAccelToModelRelativeVelocity()

void Propulsion::AIAccelToModelRelativeVelocity ( const vector3d v)
Here is the call graph for this function:

◆ AIChangeVelBy()

bool Propulsion::AIChangeVelBy ( const vector3d diffvel,
const vector3d powerLimit = vector3d(1.0) 
)
Here is the call graph for this function:

◆ AIChangeVelDir()

vector3d Propulsion::AIChangeVelDir ( const vector3d diffvel)
Here is the call graph for this function:

◆ AIFaceDirection()

double Propulsion::AIFaceDirection ( const vector3d dir,
double  av = 0 
)
Here is the call graph for this function:

◆ AIFaceUpdir()

double Propulsion::AIFaceUpdir ( const vector3d updir,
double  av = 0 
)
Here is the call graph for this function:

◆ AIGetLeadDir()

vector3d Propulsion::AIGetLeadDir ( const Body target,
const vector3d targaccel,
double  projspeed 
)
Here is the call graph for this function:

◆ AIMatchAngVelObjSpace()

void Propulsion::AIMatchAngVelObjSpace ( const vector3d angvel,
const vector3d powerLimit = vector3d(1.0),
bool  ignoreZeroValues = false 
)
Here is the call graph for this function:

◆ AIMatchVel()

bool Propulsion::AIMatchVel ( const vector3d vel,
const vector3d powerLimit = vector3d(1.0) 
)
Here is the call graph for this function:

◆ AIModelCoordsMatchSpeedRelTo()

void Propulsion::AIModelCoordsMatchSpeedRelTo ( const vector3d v,
const DynamicBody other 
)
Here is the call graph for this function:

◆ ClampLinThrusterState() [1/2]

vector3d Propulsion::ClampLinThrusterState ( const vector3d levels) const
Here is the call graph for this function:

◆ ClampLinThrusterState() [2/2]

double Propulsion::ClampLinThrusterState ( int  axis,
double  level 
) const
Here is the call graph for this function:

◆ ClearAngThrusterState()

void Propulsion::ClearAngThrusterState ( )
inline

◆ ClearLinThrusterState()

void Propulsion::ClearLinThrusterState ( )
inline

◆ FuelTankMassLeft()

float Propulsion::FuelTankMassLeft ( )
inline

◆ GetAccel()

double Propulsion::GetAccel ( Thruster  thruster) const
inline
Here is the call graph for this function:

◆ GetAccelFwd()

double Propulsion::GetAccelFwd ( ) const
inline
Here is the call graph for this function:

◆ GetAccelMin()

double Propulsion::GetAccelMin ( ) const
inline
Here is the call graph for this function:

◆ GetAccelRev()

double Propulsion::GetAccelRev ( ) const
inline
Here is the call graph for this function:

◆ GetAccelUp()

double Propulsion::GetAccelUp ( ) const
inline
Here is the call graph for this function:

◆ GetActualAngThrust()

vector3d Propulsion::GetActualAngThrust ( ) const
inline

◆ GetActualLinThrust()

vector3d Propulsion::GetActualLinThrust ( ) const
inline
Here is the call graph for this function:

◆ GetAngThrusterState()

vector3d Propulsion::GetAngThrusterState ( ) const
inline

◆ GetFuel()

double Propulsion::GetFuel ( ) const
inline

◆ GetFuelReserve()

double Propulsion::GetFuelReserve ( ) const
inline

◆ GetFuelState()

FuelState Propulsion::GetFuelState ( ) const
inline

◆ GetFuelUseRate()

float Propulsion::GetFuelUseRate ( )

◆ GetLinThrusterState()

vector3d Propulsion::GetLinThrusterState ( ) const
inline

◆ GetSpeedReachedWithFuel()

double Propulsion::GetSpeedReachedWithFuel ( ) const
Here is the call graph for this function:

◆ GetThrust() [1/2]

vector3d Propulsion::GetThrust ( const vector3d dir) const
Here is the call graph for this function:

◆ GetThrust() [2/2]

double Propulsion::GetThrust ( Thruster  thruster) const
Here is the call graph for this function:

◆ GetThrustFwd()

double Propulsion::GetThrustFwd ( ) const
inline
Here is the call graph for this function:

◆ GetThrustMin()

double Propulsion::GetThrustMin ( ) const
Here is the call graph for this function:

◆ GetThrustRev()

double Propulsion::GetThrustRev ( ) const
inline
Here is the call graph for this function:

◆ GetThrustUncapped()

vector3d Propulsion::GetThrustUncapped ( const vector3d dir) const

◆ GetThrustUp()

double Propulsion::GetThrustUp ( ) const
inline
Here is the call graph for this function:

◆ Init() [1/2]

void Propulsion::Init ( DynamicBody b,
SceneGraph::Model m,
const int  tank_mass,
const double  effExVel,
const float  lin_Thrust[],
const float  ang_Thrust 
)

◆ Init() [2/2]

void Propulsion::Init ( DynamicBody b,
SceneGraph::Model m,
const int  tank_mass,
const double  effExVel,
const float  lin_Thrust[],
const float  ang_Thrust,
const float  lin_AccelerationCap[] 
)
Here is the call graph for this function:

◆ IsFuelStateChanged()

bool Propulsion::IsFuelStateChanged ( )
inline

◆ LoadFromJson()

void Propulsion::LoadFromJson ( const Json jsonObj,
Space space 
)
virtual
Here is the call graph for this function:

◆ Render()

void Propulsion::Render ( Graphics::Renderer r,
const Camera camera,
const vector3d viewCoords,
const matrix4x4d viewTransform 
)
Here is the call graph for this function:

◆ SaveToJson()

void Propulsion::SaveToJson ( Json jsonObj,
Space space 
)
virtual

◆ SetAccelerationCapMult()

void Propulsion::SetAccelerationCapMult ( double  p,
const float  lin_AccelerationCap[] 
)

◆ SetAngThrusterState() [1/2]

void Propulsion::SetAngThrusterState ( const vector3d levels)
Here is the call graph for this function:

◆ SetAngThrusterState() [2/2]

void Propulsion::SetAngThrusterState ( int  axis,
double  level 
)
inline
Here is the call graph for this function:

◆ SetFuel()

void Propulsion::SetFuel ( const double  f)
inline
Here is the call graph for this function:

◆ SetFuelReserve()

void Propulsion::SetFuelReserve ( const double  f)
inline
Here is the call graph for this function:

◆ SetFuelTankMass()

void Propulsion::SetFuelTankMass ( int  fTank)
inline

◆ SetLinThrusterState() [1/2]

void Propulsion::SetLinThrusterState ( const vector3d levels)
Here is the call graph for this function:

◆ SetLinThrusterState() [2/2]

void Propulsion::SetLinThrusterState ( int  axis,
double  level 
)
Here is the call graph for this function:

◆ SetThrustPowerMult()

void Propulsion::SetThrustPowerMult ( double  p,
const float  lin_Thrust[],
const float  ang_Thrust 
)

◆ UpdateFuel()

void Propulsion::UpdateFuel ( const float  timeStep)
Here is the call graph for this function:

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