Pioneer
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
WorldView Class Reference

#include <WorldView.h>

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

Public Member Functions

 WorldView (Game *game)
 
 WorldView (const Json &jsonObj, Game *game)
 
virtual ~WorldView ()
 
void Update () override
 
void Draw3D () override
 
void Draw () override
 
void SaveToJson (Json &jsonObj) override
 
RefCountedPtr< CameraContextGetCameraContext () const
 
ViewControllerGetViewController () const
 
void SetViewController (ViewController *newView)
 
int GetActiveWeapon () const
 
std::tuple< double, double, double > CalculateHeadingPitchRoll (enum PlaneType)
 
vector3d WorldSpaceToScreenSpace (const Body *body) const
 
vector3d WorldSpaceToScreenSpace (const vector3d &position) const
 
vector3d WorldDirToScreenSpace (const vector3d &direction) const
 
vector3d GetTargetIndicatorScreenPosition (const Body *body) const
 
vector3d CameraSpaceToScreenSpace (const vector3d &pos) const
 
void BeginCameraFrame ()
 
void EndCameraFrame ()
 
bool ShouldShowLabels ()
 
- Public Member Functions inherited from PiGuiView
 PiGuiView (std::string name)
 
virtual void DrawPiGui () override
 
const std::string & GetViewName ()
 
- Public Member Functions inherited from View
 View ()
 
virtual ~View ()
 
virtual void LoadFromJson (const Json &jsonObj)
 
void Attach ()
 
void Detach ()
 
void SetRenderer (Graphics::Renderer *r)
 
- Public Member Functions inherited from Gui::Fixed
 Fixed (float w, float h)
 
 Fixed ()
 
void Add (Widget *child, float x, float y)
 
void Remove (Widget *child)
 
virtual ~Fixed ()
 
virtual void GetSizeRequested (float size[2])
 
virtual void OnChildResizeRequest (Widget *)
 
virtual void UpdateAllChildSizes ()
 
void SetSizeRequest (float x, float y)
 
void SetSizeRequest (float size[2])
 
- Public Member Functions inherited from Gui::Container
 Container ()
 
virtual ~Container ()
 
bool OnMouseDown (MouseButtonEvent *e)
 
bool OnMouseUp (MouseButtonEvent *e)
 
bool OnMouseMotion (MouseMotionEvent *e)
 
void RemoveAllChildren ()
 
void DeleteAllChildren ()
 
void GetChildPosition (const Widget *child, float outPos[2]) const
 
int GetNumChildren ()
 
void ShowChildren ()
 
void HideChildren ()
 
virtual void Show ()
 
virtual void ShowAll ()
 
virtual void HideAll ()
 
void SetBgColor (const Color &col)
 
void SetTransparency (bool a)
 
void RemoveChild (Widget *w)
 
- Public Member Functions inherited from Gui::Widget
 Widget ()
 
virtual ~Widget ()
 
virtual void GetMinimumSize (float size[2])
 
void GetAbsolutePosition (float pos[2]) const
 
void GetSize (float size[2])
 
void SetSize (float w, float h)
 
void ResizeRequest ()
 
void SetShortcut (SDL_Keycode key, SDL_Keymod mod)
 
void SetScissor (bool enabled)
 
bool GetEnabled ()
 
void SetEnabled (bool v)
 
virtual void GrabFocus ()
 
bool IsFocused ()
 
virtual void Hide ()
 
void HideTooltip ()
 
bool IsVisible () const
 
ContainerGetParent () const
 
void SetParent (Container *p)
 
void SetToolTip (std::string s)
 
const std::string & GetToolTip () const
 
virtual void OnActivate ()
 
virtual void OnMouseEnter ()
 
virtual void OnMouseLeave ()
 
virtual bool OnKeyDown (const SDL_Keysym *sym)
 
virtual void OnTextInput (Uint32 unicode)
 
bool IsMouseOver ()
 
void OnPreShortcut (const SDL_Keysym *sym)
 
unsigned int GetEventMask ()
 

Static Public Member Functions

static void RegisterInputBindings ()
 

Public Attributes

std::unique_ptr< ShipViewControllershipView
 
- Public Attributes inherited from Gui::Container
sigc::signal< void, MouseButtonEvent * > onMouseButtonEvent
 
- Public Attributes inherited from Gui::Widget
sigc::signal< void > onMouseEnter
 
sigc::signal< void > onMouseLeave
 
sigc::signal< void > onSetSize
 
sigc::signal< void > onDelete
 
float w
 
float h
 

Protected Member Functions

void OnSwitchTo () override
 
void OnSwitchFrom () override
 
- Protected Member Functions inherited from Gui::Container
void PrependChild (Widget *w, float x, float y)
 
void AppendChild (Widget *w, float x, float y)
 
void MoveChild (Widget *w, float x, float y)
 
WidgetList::const_iterator FindChild (const Widget *w) const
 
WidgetList::iterator FindChild (const Widget *w)
 
- Protected Member Functions inherited from Gui::Widget
virtual std::string GetOverrideTooltip ()
 
void UpdateOverriddenTooltip ()
 

Friends

class NavTunnelWidget
 

Additional Inherited Members

- Public Types inherited from Gui::Widget
enum  EventMask {
  EVENT_NONE = 0 , EVENT_KEYDOWN = 1 << 0 , EVENT_KEYUP = 1 << 1 , EVENT_MOUSEDOWN = 1 << 2 ,
  EVENT_MOUSEUP = 1 << 3 , EVENT_MOUSEMOTION = 1 << 4
}
 
- Static Public Attributes inherited from Gui::Widget
static const unsigned int EVENT_ALL = 0xffffffff
 
- Protected Types inherited from Gui::Container
typedef std::list< widget_posWidgetList
 
- Protected Attributes inherited from View
Graphics::Rendererm_renderer
 
- Protected Attributes inherited from Gui::Container
WidgetList m_children
 
- Protected Attributes inherited from Gui::Widget
unsigned int m_eventMask
 
struct {
   SDL_Keycode   sym
 
   SDL_Keymod   mod
 
m_shortcut
 

Constructor & Destructor Documentation

◆ WorldView() [1/2]

WorldView::WorldView ( Game game)

◆ WorldView() [2/2]

WorldView::WorldView ( const Json jsonObj,
Game game 
)

◆ ~WorldView()

WorldView::~WorldView ( )
virtual

Member Function Documentation

◆ BeginCameraFrame()

void WorldView::BeginCameraFrame ( )
inline

◆ CalculateHeadingPitchRoll()

std::tuple< double, double, double > WorldView::CalculateHeadingPitchRoll ( enum  PlaneType)
Here is the call graph for this function:

◆ CameraSpaceToScreenSpace()

vector3d WorldView::CameraSpaceToScreenSpace ( const vector3d pos) const

◆ Draw()

void WorldView::Draw ( )
overridevirtual

Reimplemented from Gui::Container.

Here is the call graph for this function:

◆ Draw3D()

void WorldView::Draw3D ( )
overridevirtual

Reimplemented from PiGuiView.

Here is the call graph for this function:

◆ EndCameraFrame()

void WorldView::EndCameraFrame ( )
inline

◆ GetActiveWeapon()

int WorldView::GetActiveWeapon ( ) const

◆ GetCameraContext()

RefCountedPtr<CameraContext> WorldView::GetCameraContext ( ) const
inline

◆ GetTargetIndicatorScreenPosition()

vector3d WorldView::GetTargetIndicatorScreenPosition ( const Body body) const
Here is the call graph for this function:

◆ GetViewController()

ViewController* WorldView::GetViewController ( ) const
inline

◆ OnSwitchFrom()

void WorldView::OnSwitchFrom ( )
overrideprotectedvirtual

Reimplemented from View.

Here is the call graph for this function:

◆ OnSwitchTo()

void WorldView::OnSwitchTo ( )
overrideprotectedvirtual

Reimplemented from PiGuiView.

Here is the call graph for this function:

◆ RegisterInputBindings()

static void WorldView::RegisterInputBindings ( )
static

◆ SaveToJson()

void WorldView::SaveToJson ( Json jsonObj)
overridevirtual

Reimplemented from View.

◆ SetViewController()

void WorldView::SetViewController ( ViewController newView)

◆ ShouldShowLabels()

bool WorldView::ShouldShowLabels ( )
inline

◆ Update()

void WorldView::Update ( )
overridevirtual

Reimplemented from PiGuiView.

Here is the call graph for this function:

◆ WorldDirToScreenSpace()

vector3d WorldView::WorldDirToScreenSpace ( const vector3d direction) const

◆ WorldSpaceToScreenSpace() [1/2]

vector3d WorldView::WorldSpaceToScreenSpace ( const Body body) const
Here is the call graph for this function:

◆ WorldSpaceToScreenSpace() [2/2]

vector3d WorldView::WorldSpaceToScreenSpace ( const vector3d position) const

Friends And Related Function Documentation

◆ NavTunnelWidget

friend class NavTunnelWidget
friend

Member Data Documentation

◆ shipView

std::unique_ptr<ShipViewController> WorldView::shipView

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