Pioneer
Classes | 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]

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
 
void PollControls (float timeStep, const bool force_rotation_damping, int *mouseMotion)
 
bool IsMouseActive () const
 
void SetDisableMouseFacing (bool disabled)
 
double GetSetSpeed () const override
 
void ChangeSetSpeed (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 ToggleSetSpeedMode ()
 
Body * GetCombatTarget () const
 
Body * GetNavTarget () const
 
Body * GetSetSpeedTarget () const override
 
void SetCombatTarget (Body *const target, bool setSpeedTo=false)
 
void SetNavTarget (Body *const target)
 
void SetSetSpeedTarget (Body *const target)
 
- 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 GetSetSpeed () const
 
virtual void ChangeSetSpeed (double delta)
 
virtual Body * GetSetSpeedTarget () const
 

Public Attributes

sigc::signal< void > onRotationDampingChanged
 
sigc::signal< void > onChangeTarget
 
sigc::signal< void > onChangeFlightControlState
 
- Public Attributes inherited from ShipController
Ship * m_ship
 

Friends

class Propulsion
 

Additional Inherited Members

- Public Types inherited from ShipController
enum  Type { AI = 0 , PLAYER = 1 }
 

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

◆ ChangeSetSpeed()

void PlayerShipController::ChangeSetSpeed ( double  delta)
inlineoverridevirtual

Reimplemented from ShipController.

◆ FireMissile()

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

◆ GetCombatTarget()

Body * PlayerShipController::GetCombatTarget ( ) const

◆ GetFlightControlState()

FlightControlState PlayerShipController::GetFlightControlState ( ) const
inlineoverridevirtual

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

◆ GetSetSpeed()

double PlayerShipController::GetSetSpeed ( ) const
inlineoverridevirtual

Reimplemented from ShipController.

◆ GetSetSpeedTarget()

Body * PlayerShipController::GetSetSpeedTarget ( ) const
overridevirtual

Reimplemented from ShipController.

◆ GetType()

Type PlayerShipController::GetType ( )
inlineoverridevirtual

Reimplemented from ShipController.

◆ IsMouseActive()

bool PlayerShipController::IsMouseActive ( ) const
inline

◆ LoadFromJson()

void PlayerShipController::LoadFromJson ( const Json &  jsonObj)
overridevirtual

Reimplemented from ShipController.

◆ PollControls()

void PlayerShipController::PollControls ( float  timeStep,
const bool  force_rotation_damping,
int *  mouseMotion 
)
Here is the call graph for this function:

◆ PostLoadFixup()

void PlayerShipController::PostLoadFixup ( Space *  s)
overridevirtual

Reimplemented from ShipController.

◆ SaveToJson()

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

Reimplemented from ShipController.

◆ SetCombatTarget()

void PlayerShipController::SetCombatTarget ( Body *const  target,
bool  setSpeedTo = false 
)

◆ 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:

◆ 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)

◆ SetSetSpeedTarget()

void PlayerShipController::SetSetSpeedTarget ( Body *const  target)

◆ StaticUpdate()

void PlayerShipController::StaticUpdate ( float  timeStep)
overridevirtual

Reimplemented from ShipController.

Here is the call graph for this function:

◆ ToggleRotationDamping()

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

◆ ToggleSetSpeedMode()

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

Friends And Related Function 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: