Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
FlightVesselOverlays Class Reference

This class is used to manage the CoM, CoL, CoT vessel marker/overlays in the Flight scene. More...

Inheritance diagram for FlightVesselOverlays:

Public Member Functions

void AddColMarker (Vessel vessel)
 Will create a CoL marker for vessel. Checks if one exists already and that the vessel is a ValidVessel. More...
 
void AddComMarker (Vessel vessel)
 Will create a CoM marker for vessel. Checks if one exists already and that the vessel is a ValidVessel. More...
 
void AddCotMarker (Vessel vessel)
 Will create a CoT marker for vessel. Checks if one exists already and that the vessel is a ValidVessel. More...
 
void SetCamera (bool state)
 Set the CoM CoT CoL camera state active or inactive (true/false). More...
 
void TerminateColMarkers ()
 Terminates all CoL Markers in the scene and removes from the dictionary list. More...
 
void TerminateComMarkers ()
 Terminates all CoM Markers in the scene and removes from the dictionary list. More...
 
void TerminateCotMarkers ()
 Terminates all CoT Markers in the scene and removes from the dictionary list. More...
 
void ToggleCoL ()
 Toggle CoL markers for all loaded vessels On or Off. (Toggles from current state). More...
 
void ToggleCoM ()
 Toggle CoM markers for all loaded vessels On or Off. (Toggles from current state). More...
 
void ToggleCoT ()
 Toggle CoT markers for all loaded vessels On or Off. (Toggles from current state). More...
 
delegate bool ValidVesselOverride (Vessel vessel, bool checkEngine, bool checkLift)
 Delegate that can be used to override the ValidVessel Method in this singleton class. More...
 
bool ValidVesselType (Vessel vessel, bool checkEngine, bool checkLift)
 Checks if the vessel is a valid type for CoM, CoL, CoT markers. Can be overridden by assigned validVesselOverride delegate. More...
 

Public Attributes

EditorMarker_CoL CoLmarker
 CoL Marker Prefab. More...
 
DictionaryValueList< Vessel,
EditorMarker_CoL
ColMarkers
 Dictionary list of CoL Markers. More...
 
bool ColMarkersActive
 True if CoL markers are active in the scene. This toggle is only Set true if the ToggleCoL method is called. More...
 
EditorMarker_CoM CoMmarker
 CoM Marker Prefab. More...
 
DictionaryValueList< Vessel,
EditorMarker_CoM
ComMarkers
 Dictionary list of CoM Markers. More...
 
bool ComMarkersActive
 True if CoM markers are active in the scene. This toggle is only Set true if the ToggleCoM method is called. More...
 
EditorMarker_CoT CoTmarker
 CoL Marker Prefab. More...
 
DictionaryValueList< Vessel,
EditorMarker_CoT
CotMarkers
 Dictionary list of CoT Markers. More...
 
bool CotMarkersActive
 True if CoT markers are active in the scene. This toggle is only Set true if the ToggleCoT method is called. More...
 
Camera overlayCamera
 Camera used to draw the CoL, CoM, CoT markers in editor scene. More...
 
ValidVesselOverride validVesselOverride
 Set this to the VesselOverride method you want used to override the ValidVessel check in this singleton class. More...
 

Static Public Attributes

static FlightVesselOverlays fetch
 Singleton instance of this Class in the Flight scene. More...
 

Protected Member Functions

void Awake ()
 

Detailed Description

This class is used to manage the CoM, CoL, CoT vessel marker/overlays in the Flight scene.

Member Function Documentation

void FlightVesselOverlays.AddColMarker ( Vessel  vessel)
inline

Will create a CoL marker for vessel. Checks if one exists already and that the vessel is a ValidVessel.

Parameters
vessel
void FlightVesselOverlays.AddComMarker ( Vessel  vessel)
inline

Will create a CoM marker for vessel. Checks if one exists already and that the vessel is a ValidVessel.

Parameters
vessel
void FlightVesselOverlays.AddCotMarker ( Vessel  vessel)
inline

Will create a CoT marker for vessel. Checks if one exists already and that the vessel is a ValidVessel.

Parameters
vessel
void FlightVesselOverlays.Awake ( )
inlineprotected
void FlightVesselOverlays.SetCamera ( bool  state)
inline

Set the CoM CoT CoL camera state active or inactive (true/false).

Parameters
state
void FlightVesselOverlays.TerminateColMarkers ( )
inline

Terminates all CoL Markers in the scene and removes from the dictionary list.

void FlightVesselOverlays.TerminateComMarkers ( )
inline

Terminates all CoM Markers in the scene and removes from the dictionary list.

void FlightVesselOverlays.TerminateCotMarkers ( )
inline

Terminates all CoT Markers in the scene and removes from the dictionary list.

void FlightVesselOverlays.ToggleCoL ( )
inline

Toggle CoL markers for all loaded vessels On or Off. (Toggles from current state).

void FlightVesselOverlays.ToggleCoM ( )
inline

Toggle CoM markers for all loaded vessels On or Off. (Toggles from current state).

void FlightVesselOverlays.ToggleCoT ( )
inline

Toggle CoT markers for all loaded vessels On or Off. (Toggles from current state).

delegate bool FlightVesselOverlays.ValidVesselOverride ( Vessel  vessel,
bool  checkEngine,
bool  checkLift 
)

Delegate that can be used to override the ValidVessel Method in this singleton class.

Parameters
vesselThe Vessel we are checking
checkEngineSet True to check for CoT validity eg: Vessel has engines
checkLiftSet True to check for CoL validity eg: Vessel has lifting surfaces
Returns
True or False if vessel is valid or not.
bool FlightVesselOverlays.ValidVesselType ( Vessel  vessel,
bool  checkEngine,
bool  checkLift 
)
inline

Checks if the vessel is a valid type for CoM, CoL, CoT markers. Can be overridden by assigned validVesselOverride delegate.

Parameters
vesselThe Vessel we are checking
checkEngineSet True to check for CoT validity eg: Vessel has engines
checkLiftSet True to check for CoL validity eg: Vessel has lifting surfaces
Returns
True or False if vessel is valid or not.

Member Data Documentation

EditorMarker_CoL FlightVesselOverlays.CoLmarker

CoL Marker Prefab.

DictionaryValueList<Vessel, EditorMarker_CoL> FlightVesselOverlays.ColMarkers

Dictionary list of CoL Markers.

bool FlightVesselOverlays.ColMarkersActive

True if CoL markers are active in the scene. This toggle is only Set true if the ToggleCoL method is called.

EditorMarker_CoM FlightVesselOverlays.CoMmarker

CoM Marker Prefab.

DictionaryValueList<Vessel, EditorMarker_CoM> FlightVesselOverlays.ComMarkers

Dictionary list of CoM Markers.

bool FlightVesselOverlays.ComMarkersActive

True if CoM markers are active in the scene. This toggle is only Set true if the ToggleCoM method is called.

EditorMarker_CoT FlightVesselOverlays.CoTmarker

CoL Marker Prefab.

DictionaryValueList<Vessel, EditorMarker_CoT> FlightVesselOverlays.CotMarkers

Dictionary list of CoT Markers.

bool FlightVesselOverlays.CotMarkersActive

True if CoT markers are active in the scene. This toggle is only Set true if the ToggleCoT method is called.

FlightVesselOverlays FlightVesselOverlays.fetch
static

Singleton instance of this Class in the Flight scene.

Camera FlightVesselOverlays.overlayCamera

Camera used to draw the CoL, CoM, CoT markers in editor scene.

ValidVesselOverride FlightVesselOverlays.validVesselOverride

Set this to the VesselOverride method you want used to override the ValidVessel check in this singleton class.


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