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

Classes

struct  OrbitCastHit
 

Public Types

enum  DrawIcons { DrawIcons.NONE, DrawIcons.OBJ, DrawIcons.OBJ_PE_AP, DrawIcons.ALL }
 
enum  DrawMode { DrawMode.OFF, DrawMode.REDRAW_ONLY, DrawMode.REDRAW_AND_FOLLOW, DrawMode.REDRAW_AND_RECALCULATE }
 

Public Member Functions

bool GetMouseOverNode (Vector3 worldPos, float iconSize)
 
bool IsRenderableOrbit (Orbit o, CelestialBody tgt)
 
virtual bool OrbitCast (Vector3 screenPos, out OrbitCastHit hitInfo, float orbitPixelWidth=10f)
 
virtual bool OrbitCast (Vector3 screenPos, Camera cam, out OrbitCastHit hitInfo, float orbitPixelWidth=10f)
 
virtual void RefreshMapObject ()
 If vessel is not Null and the vesselType is a VesselType.DeployedSciencePart - will terminate any objectNode that is setup. Will find again the MapObject depending on the type of object. Will then Create any missing scaledspace nodes and then attachnode UIs if any missing. More...
 
void SetColor (Color color)
 

Public Attributes

bool autoTextureOffset = true
 
CelestialBody celestialBody
 
DiscoveryInfo discoveryInfo
 
DrawIcons drawIcons = DrawIcons.OBJ
 
DrawMode drawMode = DrawMode.REDRAW_AND_RECALCULATE
 
bool drawNodes = true
 
OrbitDriver driver
 
bool EccOffsetInvert
 
bool isFocused
 
float lowerCamVsSmaRatio = 0.03f
 
Expansions.Missions.MENode meNode
 
Color nodeColor = Color.grey
 
EventData< CelestialBodyonCelestialBodyIconClicked = new EventData<CelestialBody>("OnCBIconClicked")
 
EventData< VesselonVesselIconClicked = new EventData<Vessel>("OnVesselIconClicked")
 
Color orbitColor = Color.grey
 
float textureOffset = 0f
 
float upperCamVsSmaRatio = 25f
 
Vessel vessel
 

Protected Member Functions

virtual void ANDNNodes_OnUpdateIcon (MapNode n, MapNode.IconData data)
 
virtual void apNode_OnUpdateCaption (MapNode n, MapNode.CaptionData data)
 
virtual void ApNode_OnUpdateIcon (MapNode n, MapNode.IconData data)
 
virtual Vector3d apNode_OnUpdatePosition (MapNode n)
 
virtual void ascNode_OnUpdateCaption (MapNode n, MapNode.CaptionData data)
 
virtual Vector3d ascNode_OnUpdatePosition (MapNode n)
 
virtual void AttachNodeUIs (Transform parent)
 
virtual bool CanDrawAnyIcons ()
 
virtual void descNode_OnUpdateCaption (MapNode n, MapNode.CaptionData data)
 
virtual Vector3d descNode_OnUpdatePosition (MapNode n)
 
virtual void DrawOrbit (DrawMode mode)
 
virtual void DrawSpline ()
 
virtual DrawIcons GetCurrentDrawMode ()
 
virtual Color GetNodeColour ()
 
virtual Color GetOrbitColour ()
 
virtual bool HaveStateVectorKnowledge ()
 
virtual void LateUpdate ()
 
virtual void objectNode_OnClick (MapNode mn, Mouse.Buttons btns)
 
virtual void objectNode_OnUpdateCaption (MapNode n, MapNode.CaptionData data)
 
virtual void objectNode_OnUpdateIcon (MapNode n, MapNode.IconData data)
 
virtual Vector3d objectNode_OnUpdatePosition (MapNode n)
 
virtual void objectNode_OnUpdateType (MapNode n, MapNode.TypeData data)
 
virtual void OnDestroy ()
 
virtual void peNode_OnUpdateCaption (MapNode n, MapNode.CaptionData data)
 
virtual void PeNode_OnUpdateIcon (MapNode n, MapNode.IconData data)
 
virtual Vector3d peNode_OnUpdatePosition (MapNode n)
 
void SplineOpacityUpdate ()
 
virtual void Start ()
 
virtual void UpdateSpline ()
 

Protected Attributes

bool draw3dLines
 
double eccOffset
 
int layerMask = 31
 
float lineOpacity
 
Transform nodesParent
 
VectorLine orbitLine
 
float twkOffset
 

Static Protected Attributes

static double sampleResolution = 2
 

Properties

bool isActive [get]
 
bool mouseOver [get]
 
string objName [get, set]
 
Orbit orbit [get]
 
VectorLine OrbitLine [get]
 
Vector3d[] OrbitPoints [get, set]
 

Member Enumeration Documentation

Enumerator
NONE 
OBJ 
OBJ_PE_AP 
ALL 
Enumerator
OFF 
REDRAW_ONLY 
REDRAW_AND_FOLLOW 
REDRAW_AND_RECALCULATE 

Member Function Documentation

virtual void OrbitRendererBase.ANDNNodes_OnUpdateIcon ( MapNode  n,
MapNode.IconData  data 
)
inlineprotectedvirtual

Reimplemented in OrbitTargetRenderer.

virtual void OrbitRendererBase.apNode_OnUpdateCaption ( MapNode  n,
MapNode.CaptionData  data 
)
inlineprotectedvirtual
virtual void OrbitRendererBase.ApNode_OnUpdateIcon ( MapNode  n,
MapNode.IconData  data 
)
inlineprotectedvirtual
virtual Vector3d OrbitRendererBase.apNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual
virtual void OrbitRendererBase.ascNode_OnUpdateCaption ( MapNode  n,
MapNode.CaptionData  data 
)
inlineprotectedvirtual
virtual Vector3d OrbitRendererBase.ascNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual

Reimplemented in OrbitTargetRenderer.

virtual void OrbitRendererBase.AttachNodeUIs ( Transform  parent)
inlineprotectedvirtual
virtual bool OrbitRendererBase.CanDrawAnyIcons ( )
inlineprotectedvirtual

Reimplemented in OrbitTargetRenderer, and OrbitRenderer.

virtual void OrbitRendererBase.descNode_OnUpdateCaption ( MapNode  n,
MapNode.CaptionData  data 
)
inlineprotectedvirtual
virtual Vector3d OrbitRendererBase.descNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual

Reimplemented in OrbitTargetRenderer.

virtual void OrbitRendererBase.DrawOrbit ( DrawMode  mode)
inlineprotectedvirtual

Reimplemented in OrbitRenderer.

virtual void OrbitRendererBase.DrawSpline ( )
inlineprotectedvirtual
virtual DrawIcons OrbitRendererBase.GetCurrentDrawMode ( )
inlineprotectedvirtual
bool OrbitRendererBase.GetMouseOverNode ( Vector3  worldPos,
float  iconSize 
)
inline
virtual Color OrbitRendererBase.GetNodeColour ( )
inlineprotectedvirtual

Reimplemented in OrbitRenderer.

virtual Color OrbitRendererBase.GetOrbitColour ( )
inlineprotectedvirtual

Reimplemented in OrbitRenderer.

virtual bool OrbitRendererBase.HaveStateVectorKnowledge ( )
inlineprotectedvirtual
bool OrbitRendererBase.IsRenderableOrbit ( Orbit  o,
CelestialBody  tgt 
)
inline
virtual void OrbitRendererBase.LateUpdate ( )
inlineprotectedvirtual
virtual void OrbitRendererBase.objectNode_OnClick ( MapNode  mn,
Mouse.Buttons  btns 
)
inlineprotectedvirtual
virtual void OrbitRendererBase.objectNode_OnUpdateCaption ( MapNode  n,
MapNode.CaptionData  data 
)
inlineprotectedvirtual
virtual void OrbitRendererBase.objectNode_OnUpdateIcon ( MapNode  n,
MapNode.IconData  data 
)
inlineprotectedvirtual
virtual Vector3d OrbitRendererBase.objectNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual
virtual void OrbitRendererBase.objectNode_OnUpdateType ( MapNode  n,
MapNode.TypeData  data 
)
inlineprotectedvirtual
virtual void OrbitRendererBase.OnDestroy ( )
inlineprotectedvirtual

Reimplemented in OrbitRenderer.

virtual bool OrbitRendererBase.OrbitCast ( Vector3  screenPos,
out OrbitCastHit  hitInfo,
float  orbitPixelWidth = 10f 
)
inlinevirtual

Reimplemented in OrbitRenderer.

virtual bool OrbitRendererBase.OrbitCast ( Vector3  screenPos,
Camera  cam,
out OrbitCastHit  hitInfo,
float  orbitPixelWidth = 10f 
)
inlinevirtual

define orbital plane

figure out where the mouse intersects the plane

find the true anomaly for the mouse position

find the radius for the true anomaly on this orbit, and the point along the orbit

see if the mouse is within pixel range of the orbit point

virtual void OrbitRendererBase.peNode_OnUpdateCaption ( MapNode  n,
MapNode.CaptionData  data 
)
inlineprotectedvirtual
virtual void OrbitRendererBase.PeNode_OnUpdateIcon ( MapNode  n,
MapNode.IconData  data 
)
inlineprotectedvirtual
virtual Vector3d OrbitRendererBase.peNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual
virtual void OrbitRendererBase.RefreshMapObject ( )
inlinevirtual

If vessel is not Null and the vesselType is a VesselType.DeployedSciencePart - will terminate any objectNode that is setup. Will find again the MapObject depending on the type of object. Will then Create any missing scaledspace nodes and then attachnode UIs if any missing.

void OrbitRendererBase.SetColor ( Color  color)
inline
void OrbitRendererBase.SplineOpacityUpdate ( )
inlineprotected
virtual void OrbitRendererBase.Start ( )
inlineprotectedvirtual

< default orbit spline colour to half brightness of node colour (probably due to U5's lighting model hack removal)

< not even sure what this object is, we might as well see what its orbit looks like

< the map object for this vessel/celestial body will already have been created, we just need to grab it from ScaledSpace

< the other nodes we generate here

< ui nodes attach to all

Reimplemented in Expansions.Missions.Editor.GAPOrbitRenderer, and OrbitRenderer.

virtual void OrbitRendererBase.UpdateSpline ( )
inlineprotectedvirtual

< plot orbit ellipse points

Member Data Documentation

bool OrbitRendererBase.autoTextureOffset = true
CelestialBody OrbitRendererBase.celestialBody
DiscoveryInfo OrbitRendererBase.discoveryInfo
bool OrbitRendererBase.draw3dLines
protected
DrawIcons OrbitRendererBase.drawIcons = DrawIcons.OBJ
DrawMode OrbitRendererBase.drawMode = DrawMode.REDRAW_AND_RECALCULATE
bool OrbitRendererBase.drawNodes = true
OrbitDriver OrbitRendererBase.driver
double OrbitRendererBase.eccOffset
protected
bool OrbitRendererBase.EccOffsetInvert
bool OrbitRendererBase.isFocused
int OrbitRendererBase.layerMask = 31
protected
float OrbitRendererBase.lineOpacity
protected
float OrbitRendererBase.lowerCamVsSmaRatio = 0.03f
Expansions.Missions.MENode OrbitRendererBase.meNode
Color OrbitRendererBase.nodeColor = Color.grey
Transform OrbitRendererBase.nodesParent
protected
EventData<CelestialBody> OrbitRendererBase.onCelestialBodyIconClicked = new EventData<CelestialBody>("OnCBIconClicked")
EventData<Vessel> OrbitRendererBase.onVesselIconClicked = new EventData<Vessel>("OnVesselIconClicked")
Color OrbitRendererBase.orbitColor = Color.grey
VectorLine OrbitRendererBase.orbitLine
protected
double OrbitRendererBase.sampleResolution = 2
staticprotected
float OrbitRendererBase.textureOffset = 0f
float OrbitRendererBase.twkOffset
protected
float OrbitRendererBase.upperCamVsSmaRatio = 25f
Vessel OrbitRendererBase.vessel

Property Documentation

bool OrbitRendererBase.isActive
get
bool OrbitRendererBase.mouseOver
get
string OrbitRendererBase.objName
getset
Orbit OrbitRendererBase.orbit
getprotected
VectorLine OrbitRendererBase.OrbitLine
get
Vector3d [] OrbitRendererBase.OrbitPoints
getset

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