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

#include <SystemView.h>

Collaboration diagram for Projectable:
Collaboration graph
[legend]

Classes

struct  GroupInfo
 

Public Types

enum  types {
  NONE = 0 , OBJECT = 1 , L4 = 2 , L5 = 3 ,
  APOAPSIS = 4 , PERIAPSIS = 5 , ORBIT = 6 , _MAX = 7
}
 
enum  bases {
  SYSTEMBODY = 0 , BODY = 1 , SHIP = 2 , PLAYER = 3 ,
  PLANNER = 4
}
 

Public Member Functions

 Projectable (const types t, const bases b, const Body *obj, const vector3d &pos=vector3d())
 
 Projectable (const types t, const bases b, const SystemBody *obj, const vector3d &pos=vector3d())
 
 Projectable ()
 
void * getRef () const
 
bool operator== (const Projectable &rhs) const
 

Public Attributes

enum Projectable::types type
 
enum Projectable::bases base
 
union {
   const Body *   body
 
   const SystemBody *   sbody
 
ref
 
vector3f screenpos
 
float screensize = 0.f
 
vector3d worldpos
 
int orbitIdx = -1
 

Detailed Description

Projectable is used as an opaque data container to represent an "object track" that the system map operates on. External systems push a projectable to represent a sensor contact or object in worldspace that should be visible to the player, and the map is responsible for transforming and culling them.

OBJECT-type projectables refer to a concrete body or sensor contact, and can potentially be centered, focused, and selected by the user.

All other projectable types represent visual-only elements which represent the intent to draw icons or orbit lines to the system map.

User code is permitted to extend the Projectable::types enum by passing integer values beyond types::_MAX to implement custom projectable types if needed. This should only be done with a wholly-owned SystemMapViewport however (i.e. don't use it with SystemView).

Member Enumeration Documentation

◆ bases

Enumerator
SYSTEMBODY 
BODY 
SHIP 
PLAYER 
PLANNER 

◆ types

Enumerator
NONE 
OBJECT 
L4 
L5 
APOAPSIS 
PERIAPSIS 
ORBIT 
_MAX 

Constructor & Destructor Documentation

◆ Projectable() [1/3]

Projectable::Projectable ( const types  t,
const bases  b,
const Body obj,
const vector3d pos = vector3d() 
)
inline

◆ Projectable() [2/3]

Projectable::Projectable ( const types  t,
const bases  b,
const SystemBody obj,
const vector3d pos = vector3d() 
)
inline

◆ Projectable() [3/3]

Projectable::Projectable ( )
inline

Member Function Documentation

◆ getRef()

void * Projectable::getRef ( ) const
inline

◆ operator==()

bool Projectable::operator== ( const Projectable rhs) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ base

enum Projectable::bases Projectable::base

◆ body

const Body* Projectable::body

◆ orbitIdx

int Projectable::orbitIdx = -1

◆ 

union { ... } Projectable::ref

◆ sbody

const SystemBody* Projectable::sbody

◆ screenpos

vector3f Projectable::screenpos

◆ screensize

float Projectable::screensize = 0.f

◆ type

enum Projectable::types Projectable::type

◆ worldpos

vector3d Projectable::worldpos

The documentation for this struct was generated from the following file: