Pioneer
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Friends | List of all members
PlayerShipController Class Reference

#include <PlayerShipController.h>

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

Classes

struct  TotalDesiredAction
 
struct  Util
 

Public Types

enum  CruiseDirection { CRUISE_FWD , CRUISE_UP }
 
enum  FollowMode { FOLLOW_POS , FOLLOW_ORI }
 
- Public Types inherited from ShipController
enum  Type { AI = 0 , PLAYER = 1 }
 

Public Member Functions

 PlayerShipController ()
 
 ~PlayerShipController ()
 
Type GetType () override
 
void SaveToJson (Json &jsonObj, Space *s) override
 
void LoadFromJson (const Json &jsonObj) override
 
void PostLoadFixup (Space *s) override
 
void StaticUpdate (float timeStep) override
 
bool IsMouseActive () const
 
void SetDisableMouseFacing (bool disabled)
 
double GetCruiseSpeed () const override
 
void ChangeCruiseSpeed (double delta) override
 
FlightControlState GetFlightControlState () const override
 
vector3d GetMouseDir () const
 
vector3d GetMouseViewDir () const
 
void SetMouseForRearView (bool enable)
 
void SetFlightControlState (FlightControlState s) override
 
float GetLowThrustPower () const
 
void SetLowThrustPower (float power)
 
bool GetRotationDamping () const
 
void SetRotationDamping (bool enabled)
 
void ToggleRotationDamping ()
 
void FireMissile ()
 
void ToggleCruise ()
 
void SelectTarget ()
 
void CycleHostiles ()
 
BodyGetCombatTarget () const
 
BodyGetNavTarget () const
 
BodyGetFollowTarget () const override
 
void SetCombatTarget (Body *const target, bool setFollowTo=false)
 
void SetNavTarget (Body *const target)
 
void SetFollowTarget (Body *const target)
 
void SetCruiseDirection (CruiseDirection mode)
 
CruiseDirection GetCruiseDirection () const
 
void SetFollowMode (FollowMode mode)
 
FollowMode GetFollowMode () const
 
void SetSpeedLimit (double limit)
 
double GetSpeedLimit ()
 
void SetSpeedLimiterActive (bool active)
 
bool IsSpeedLimiterActive () const
 
bool IsShipDrifting ()
 
- Public Member Functions inherited from ShipController
 ShipController ()
 
virtual ~ShipController ()
 
virtual Type GetType ()
 
virtual void SaveToJson (Json &jsonObj, Space *s)
 
virtual void LoadFromJson (const Json &jsonObj)
 
virtual void PostLoadFixup (Space *)
 
virtual void StaticUpdate (float timeStep)
 
virtual void SetFlightControlState (FlightControlState s)
 
virtual FlightControlState GetFlightControlState () const
 
virtual double GetCruiseSpeed () const
 
virtual void ChangeCruiseSpeed (double delta)
 
virtual BodyGetFollowTarget () const
 

Public Attributes

sigc::signal< void > onRotationDampingChanged
 
sigc::signal< void > onChangeTarget
 
sigc::signal< void > onChangeFlightControlState
 
- Public Attributes inherited from ShipController
Shipm_ship
 

Friends

class Propulsion
 

Member Enumeration Documentation

◆ CruiseDirection

Enumerator
CRUISE_FWD 
CRUISE_UP 

◆ FollowMode

Enumerator
FOLLOW_POS 
FOLLOW_ORI 

Constructor & Destructor Documentation

◆ PlayerShipController()

PlayerShipController::PlayerShipController ( )
Here is the call graph for this function:

◆ ~PlayerShipController()

PlayerShipController::~PlayerShipController ( )
Here is the call graph for this function:

Member Function Documentation

◆ ChangeCruiseSpeed()

void PlayerShipController::ChangeCruiseSpeed ( double  delta)
inlineoverridevirtual

Reimplemented from ShipController.

◆ CycleHostiles()

void PlayerShipController::CycleHostiles ( )
Here is the call graph for this function:

◆ FireMissile()

void PlayerShipController::FireMissile ( )
Here is the call graph for this function:

◆ GetCombatTarget()

Body * PlayerShipController::GetCombatTarget ( ) const

◆ GetCruiseDirection()

CruiseDirection PlayerShipController::GetCruiseDirection ( ) const
inline

◆ GetCruiseSpeed()

double PlayerShipController::GetCruiseSpeed ( ) const
inlineoverridevirtual

Reimplemented from ShipController.

◆ GetFlightControlState()

FlightControlState PlayerShipController::GetFlightControlState ( ) const
inlineoverridevirtual

Reimplemented from ShipController.

◆ GetFollowMode()

FollowMode PlayerShipController::GetFollowMode ( ) const
inline

◆ GetFollowTarget()

Body * PlayerShipController::GetFollowTarget ( ) const
overridevirtual

Reimplemented from ShipController.

◆ GetLowThrustPower()

float PlayerShipController::GetLowThrustPower ( ) const
inline

◆ GetMouseDir()

vector3d PlayerShipController::GetMouseDir ( ) const
Here is the call graph for this function:

◆ GetMouseViewDir()

vector3d PlayerShipController::GetMouseViewDir ( ) const
Here is the call graph for this function:

◆ GetNavTarget()

Body * PlayerShipController::GetNavTarget ( ) const

◆ GetRotationDamping()

bool PlayerShipController::GetRotationDamping ( ) const
inline

◆ GetSpeedLimit()

double PlayerShipController::GetSpeedLimit ( )
inline

◆ GetType()

Type PlayerShipController::GetType ( )
inlineoverridevirtual

Reimplemented from ShipController.

◆ IsMouseActive()

bool PlayerShipController::IsMouseActive ( ) const
inline

◆ IsShipDrifting()

bool PlayerShipController::IsShipDrifting ( )
Here is the call graph for this function:

◆ IsSpeedLimiterActive()

bool PlayerShipController::IsSpeedLimiterActive ( ) const
inline

◆ LoadFromJson()

void PlayerShipController::LoadFromJson ( const Json jsonObj)
overridevirtual

Reimplemented from ShipController.

◆ PostLoadFixup()

void PlayerShipController::PostLoadFixup ( Space s)
overridevirtual

Reimplemented from ShipController.

Here is the call graph for this function:

◆ SaveToJson()

void PlayerShipController::SaveToJson ( Json jsonObj,
Space s 
)
overridevirtual

Reimplemented from ShipController.

Here is the call graph for this function:

◆ SelectTarget()

void PlayerShipController::SelectTarget ( )
Here is the call graph for this function:

◆ SetCombatTarget()

void PlayerShipController::SetCombatTarget ( Body *const  target,
bool  setFollowTo = false 
)
Here is the call graph for this function:

◆ SetCruiseDirection()

void PlayerShipController::SetCruiseDirection ( CruiseDirection  mode)
Here is the call graph for this function:

◆ SetDisableMouseFacing()

void PlayerShipController::SetDisableMouseFacing ( bool  disabled)
inline

◆ SetFlightControlState()

void PlayerShipController::SetFlightControlState ( FlightControlState  s)
overridevirtual

Reimplemented from ShipController.

Here is the call graph for this function:

◆ SetFollowMode()

void PlayerShipController::SetFollowMode ( FollowMode  mode)
inline

◆ SetFollowTarget()

void PlayerShipController::SetFollowTarget ( Body *const  target)
Here is the call graph for this function:

◆ SetLowThrustPower()

void PlayerShipController::SetLowThrustPower ( float  power)

◆ SetMouseForRearView()

void PlayerShipController::SetMouseForRearView ( bool  enable)
inline

◆ SetNavTarget()

void PlayerShipController::SetNavTarget ( Body *const  target)

◆ SetRotationDamping()

void PlayerShipController::SetRotationDamping ( bool  enabled)

◆ SetSpeedLimit()

void PlayerShipController::SetSpeedLimit ( double  limit)
inline

◆ SetSpeedLimiterActive()

void PlayerShipController::SetSpeedLimiterActive ( bool  active)
inline

◆ StaticUpdate()

void PlayerShipController::StaticUpdate ( float  timeStep)
overridevirtual

Reimplemented from ShipController.

Here is the call graph for this function:

◆ ToggleCruise()

void PlayerShipController::ToggleCruise ( )
Here is the call graph for this function:

◆ ToggleRotationDamping()

void PlayerShipController::ToggleRotationDamping ( )
Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Propulsion

friend class Propulsion
friend

Member Data Documentation

◆ onChangeFlightControlState

sigc::signal<void> PlayerShipController::onChangeFlightControlState

◆ onChangeTarget

sigc::signal<void> PlayerShipController::onChangeTarget

◆ onRotationDampingChanged

sigc::signal<void> PlayerShipController::onRotationDampingChanged

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