Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Expansions.Missions.Editor.GAPCelestialBodyState_Orbit Class Reference
Inheritance diagram for Expansions.Missions.Editor.GAPCelestialBodyState_Orbit:
Expansions.Missions.Editor.GAPCelestialBodyState_Base

Public Member Functions

override void End ()
 Terminates this state, used for clean up More...
 
bool GizmoDragCastHit (out OrbitRendererBase.OrbitCastHit hitInfo)
 Cast a more permisive orbit cast to detect the gizmo drag movement More...
 
override void Init (GAPCelestialBody gapRef)
 Initalize this state More...
 
override void LateUpdate ()
 Update this state, called at the end of every frame More...
 
override void LoadPlanet (CelestialBody body)
 Notify the load of a new planet in the GAP More...
 
override void OnClick (RaycastHit?hit)
 Called when the GAP gets clicked More...
 
override void OnDrag (PointerEventData.InputButton arg0, Vector2 arg1)
 Called when the mouse is rightclick holding and dragging in the GAP window More...
 
override void OnMouseOver (Vector2 cameraPoint)
 Called when the mouse is hovered over the GAP More...
 
void ToggleMeanAnomalyIcon (bool toggleValue)
 
override void UnloadPlanet ()
 Notify the unload of a planet in the GAP More...
 
void UpdateOrbit ()
 Update, recalculate & redraws the orbit More...
 
- Public Member Functions inherited from Expansions.Missions.Editor.GAPCelestialBodyState_Base
GAPOrbitRenderer CreateSimpleOrbit (AdditionalEntity entityType, string name, Orbit orbit, MapNode.TypeData typeData)
 
void CreateSurfaceAreaGizmo (double latitude, double longitude, double radius)
 
GAPSurfaceIcon CreateSurfaceIcon (AdditionalEntity entityType, string name, MapNode.TypeData typeData, double latitude, double longitude, double altitude)
 
virtual void OnClickUp (RaycastHit?hit)
 Called when the GAP gets clicked and the mouse button is released More...
 
virtual void OnDragEnd (RaycastHit?hit)
 Called when mouse button is released after dragging More...
 
void OnFilterButton (AdditionalEntity entityType)
 UI Button events More...
 
void SetFilter (AdditionalEntity entityType, bool displayIcons)
 Icon toggles More...
 
virtual void Update ()
 Updates the state, its called each frame More...
 

Static Public Member Functions

static double CalculateBodyEditorAngle (CelestialBody body)
 When working with the celestial body, is reset to 0, This method will give an inverse angle to the current body rotation to allow calculating the relative value. More...
 

Public Attributes

OrbitGizmo.HandlesUpdatedCallback OnGlobalGizmoUpdate = (v, u) => { }
 Event triggered on global gizmo value update More...
 
Callback OnOrbitReset = () => { }
 Event triggered on gizmo reset button click More...
 
OrbitGizmo.HandlesUpdatedCallback OnPointGizmoUpdate = (v, u) => { }
 Event triggered on point gizmo value update More...
 

Protected Member Functions

MapNode CreateMapNode (string nodeName, Color nodeColor, int size, MapObject.ObjectType objectType, Func< MapNode, Vector3d > onUpdatePositionFunction, Callback< MapNode, MapNode.IconData > onUpdateVisibleCallback, Callback< MapNode, MapNode.CaptionData > onUpdateCaptionCallback)
 Creates the mouse over indication node in the orbit More...
 
void UpdateGizmoPosition ()
 Updates the position of the orbit gizmo More...
 

Additional Inherited Members

- Public Types inherited from Expansions.Missions.Editor.GAPCelestialBodyState_Base
enum  AdditionalEntity {
  AdditionalEntity.Kerbal, AdditionalEntity.Asteroid, AdditionalEntity.Vessel, AdditionalEntity.Flag,
  AdditionalEntity.LaunchSite, AdditionalEntity.Objective
}
 
- Protected Attributes inherited from Expansions.Missions.Editor.GAPCelestialBodyState_Base
AdditionalEntity[] entityTypes
 
GAPCelestialBody gapRef
 

Member Function Documentation

static double Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.CalculateBodyEditorAngle ( CelestialBody  body)
inlinestatic

When working with the celestial body, is reset to 0, This method will give an inverse angle to the current body rotation to allow calculating the relative value.

MapNode Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.CreateMapNode ( string  nodeName,
Color  nodeColor,
int  size,
MapObject.ObjectType  objectType,
Func< MapNode, Vector3d onUpdatePositionFunction,
Callback< MapNode, MapNode.IconData onUpdateVisibleCallback,
Callback< MapNode, MapNode.CaptionData onUpdateCaptionCallback 
)
inlineprotected

Creates the mouse over indication node in the orbit

Returns
override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.End ( )
inlinevirtual

Terminates this state, used for clean up

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

bool Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.GizmoDragCastHit ( out OrbitRendererBase.OrbitCastHit  hitInfo)
inline

Cast a more permisive orbit cast to detect the gizmo drag movement

Parameters
hitInfo
Returns
override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.Init ( GAPCelestialBody  gapRef)
inlinevirtual

Initalize this state

Parameters
gapRef

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.LateUpdate ( )
inlinevirtual

Update this state, called at the end of every frame

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.LoadPlanet ( CelestialBody  body)
inlinevirtual

Notify the load of a new planet in the GAP

Parameters
body

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.OnClick ( RaycastHit?  hit)
inlinevirtual

Called when the GAP gets clicked

Parameters
hitThe ray is from the gap localspace, it will usually hit the planet sphere collider

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.OnDrag ( PointerEventData.InputButton  arg0,
Vector2  arg1 
)
inlinevirtual

Called when the mouse is rightclick holding and dragging in the GAP window

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.OnMouseOver ( Vector2  cameraPoint)
inlinevirtual

Called when the mouse is hovered over the GAP

Parameters
cameraPointThe point in screenspace of the gap

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.ToggleMeanAnomalyIcon ( bool  toggleValue)
inline
override void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.UnloadPlanet ( )
inlinevirtual

Notify the unload of a planet in the GAP

Reimplemented from Expansions.Missions.Editor.GAPCelestialBodyState_Base.

void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.UpdateGizmoPosition ( )
inlineprotected

Updates the position of the orbit gizmo

void Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.UpdateOrbit ( )
inline

Update, recalculate & redraws the orbit

Member Data Documentation

OrbitGizmo.HandlesUpdatedCallback Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.OnGlobalGizmoUpdate = (v, u) => { }

Event triggered on global gizmo value update

Callback Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.OnOrbitReset = () => { }

Event triggered on gizmo reset button click

OrbitGizmo.HandlesUpdatedCallback Expansions.Missions.Editor.GAPCelestialBodyState_Orbit.OnPointGizmoUpdate = (v, u) => { }

Event triggered on point gizmo value update


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