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

#include <SystemView.h>

Collaboration diagram for SystemMapViewport:
Collaboration graph
[legend]

Public Types

enum  ColorIndex {
  GRID = 0 , GRID_LEG = 1 , SYSTEMBODY = 2 , SYSTEMBODY_ORBIT = 3 ,
  PLAYER_ORBIT = 4 , PLANNER_ORBIT = 5 , SELECTED_SHIP_ORBIT = 6 , SHIP_ORBIT = 7
}
 

Public Member Functions

 SystemMapViewport (GuiApplication *app)
 
 ~SystemMapViewport ()
 
void Update (float deltaTime)
 
void HandleInput (float deltaTime)
 
void Draw3D ()
 
ProjectableGetSelectedObject ()
 
void SetSelectedObject (Projectable p)
 
void ClearSelectedObject ()
 
void ViewSelectedObject ()
 
void SetViewedObject (Projectable p)
 
void ResetViewpoint ()
 
ProjectableGetViewedObject ()
 
ShowLagrange GetShowLagrange ()
 
ShipDrawing GetShipDrawing ()
 
GridDrawing GetGridDrawing ()
 
std::vector< Projectable::GroupInfoGroupProjectables (vector2f groupThreshold, const std::vector< Projectable > &specialObjects)
 
void AddObjectTrack (Projectable p)
 
void AddOrbitTrack (Projectable p, const Orbit *orbit, Color color, double planetRadius)
 
RefCountedPtr< StarSystemGetCurrentSystem ()
 
void SetCurrentSystem (RefCountedPtr< StarSystem > system)
 
void AccelerateTime (float step)
 
void SetRealTime ()
 
void SetReferenceTime (double time)
 
double GetTime ()
 
const std::vector< Projectable > & GetProjected () const
 
void SetVisibility (std::string param)
 
void SetZoomMode (bool enable)
 
void SetRotateMode (bool enable)
 
void SetDisplayMode (SystemView::Mode displayMode)
 
void SetBackground (Background::Container *bg)
 
void SetShowGravpoints (bool enabled)
 
double ProjectedSize (double size, vector3d pos)
 
float AtlasViewPlanetGap (float planetRadius)
 
float AtlasViewPixelPerUnit ()
 
float GetZoom () const
 
void SetColor (ColorIndex color_index, Color *color_value)
 

Public Attributes

Color svColor [8]
 
sigc::slot< double(const SystemBody *)> GetStarportHeightAboveTerrain
 

Detailed Description

The SystemMapViewport is a context-agnostic map interface concerned with rendering the layout of the selected system and optionally positioning and processing Projectables pushed to it by external code.

It is intentionally "blind" to all Game-related functionality so it can be used in both a gameplay and tools-related context regardless of whether the Pi framework is currently running.

The typical flow for the SystemMap is:

Member Enumeration Documentation

◆ ColorIndex

Enumerator
GRID 
GRID_LEG 
SYSTEMBODY 
SYSTEMBODY_ORBIT 
PLAYER_ORBIT 
PLANNER_ORBIT 
SELECTED_SHIP_ORBIT 
SHIP_ORBIT 

Constructor & Destructor Documentation

◆ SystemMapViewport()

SystemMapViewport::SystemMapViewport ( GuiApplication app)
Here is the call graph for this function:

◆ ~SystemMapViewport()

SystemMapViewport::~SystemMapViewport ( )

Member Function Documentation

◆ AccelerateTime()

void SystemMapViewport::AccelerateTime ( float  step)

◆ AddObjectTrack()

void SystemMapViewport::AddObjectTrack ( Projectable  p)

◆ AddOrbitTrack()

void SystemMapViewport::AddOrbitTrack ( Projectable  p,
const Orbit orbit,
Color  color,
double  planetRadius 
)

◆ AtlasViewPixelPerUnit()

float SystemMapViewport::AtlasViewPixelPerUnit ( )

◆ AtlasViewPlanetGap()

float SystemMapViewport::AtlasViewPlanetGap ( float  planetRadius)
inline

◆ ClearSelectedObject()

void SystemMapViewport::ClearSelectedObject ( )

◆ Draw3D()

void SystemMapViewport::Draw3D ( )
Here is the call graph for this function:

◆ GetCurrentSystem()

RefCountedPtr< StarSystem > SystemMapViewport::GetCurrentSystem ( )

◆ GetGridDrawing()

GridDrawing SystemMapViewport::GetGridDrawing ( )
inline

◆ GetProjected()

const std::vector< Projectable > & SystemMapViewport::GetProjected ( ) const
inline

◆ GetSelectedObject()

Projectable * SystemMapViewport::GetSelectedObject ( )
inline

◆ GetShipDrawing()

ShipDrawing SystemMapViewport::GetShipDrawing ( )
inline

◆ GetShowLagrange()

ShowLagrange SystemMapViewport::GetShowLagrange ( )
inline

◆ GetTime()

double SystemMapViewport::GetTime ( )
inline

◆ GetViewedObject()

Projectable * SystemMapViewport::GetViewedObject ( )
inline

◆ GetZoom()

float SystemMapViewport::GetZoom ( ) const

◆ GroupProjectables()

std::vector< Projectable::GroupInfo > SystemMapViewport::GroupProjectables ( vector2f  groupThreshold,
const std::vector< Projectable > &  specialObjects 
)
Here is the call graph for this function:

◆ HandleInput()

void SystemMapViewport::HandleInput ( float  deltaTime)
Here is the call graph for this function:

◆ ProjectedSize()

double SystemMapViewport::ProjectedSize ( double  size,
vector3d  pos 
)
Here is the call graph for this function:

◆ ResetViewpoint()

void SystemMapViewport::ResetViewpoint ( )
Here is the call graph for this function:

◆ SetBackground()

void SystemMapViewport::SetBackground ( Background::Container bg)
inline

◆ SetColor()

void SystemMapViewport::SetColor ( ColorIndex  color_index,
Color color_value 
)
inline

◆ SetCurrentSystem()

void SystemMapViewport::SetCurrentSystem ( RefCountedPtr< StarSystem system)
Here is the call graph for this function:

◆ SetDisplayMode()

void SystemMapViewport::SetDisplayMode ( SystemView::Mode  displayMode)
inline

◆ SetRealTime()

void SystemMapViewport::SetRealTime ( )

◆ SetReferenceTime()

void SystemMapViewport::SetReferenceTime ( double  time)
inline

◆ SetRotateMode()

void SystemMapViewport::SetRotateMode ( bool  enable)
Here is the call graph for this function:

◆ SetSelectedObject()

void SystemMapViewport::SetSelectedObject ( Projectable  p)
inline

◆ SetShowGravpoints()

void SystemMapViewport::SetShowGravpoints ( bool  enabled)
inline

◆ SetViewedObject()

void SystemMapViewport::SetViewedObject ( Projectable  p)

◆ SetVisibility()

void SystemMapViewport::SetVisibility ( std::string  param)
Here is the call graph for this function:

◆ SetZoomMode()

void SystemMapViewport::SetZoomMode ( bool  enable)
Here is the call graph for this function:

◆ Update()

void SystemMapViewport::Update ( float  deltaTime)
Here is the call graph for this function:

◆ ViewSelectedObject()

void SystemMapViewport::ViewSelectedObject ( )
inline
Here is the call graph for this function:

Member Data Documentation

◆ GetStarportHeightAboveTerrain

sigc::slot<double(const SystemBody *)> SystemMapViewport::GetStarportHeightAboveTerrain

◆ svColor

Color SystemMapViewport::svColor[8]

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