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

Public Member Functions

void Cleanup ()
 
- Public Member Functions inherited from OrbitRenderer
override bool OrbitCast (Vector3 screenPos, out OrbitCastHit hitInfo, float orbitPixelWidth=10)
 
- Public Member Functions inherited from OrbitRendererBase
bool GetMouseOverNode (Vector3 worldPos, float iconSize)
 
bool IsRenderableOrbit (Orbit o, CelestialBody tgt)
 
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 activeDraw
 
float animationTimerCurrent
 
float animationTimerMax = 8f
 
OrbitSnapshot snapshot
 
- Public Attributes inherited from OrbitRendererBase
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

override void ANDNNodes_OnUpdateIcon (MapNode n, MapNode.IconData data)
 
override Vector3d ascNode_OnUpdatePosition (MapNode n)
 
override bool CanDrawAnyIcons ()
 
override Vector3d descNode_OnUpdatePosition (MapNode n)
 
virtual void UpdateLocals ()
 
- Protected Member Functions inherited from OrbitRenderer
override void DrawOrbit (DrawMode mode)
 
override Color GetNodeColour ()
 
override Color GetOrbitColour ()
 
override void OnDestroy ()
 
override void Start ()
 
- Protected Member Functions inherited from OrbitRendererBase
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 void AttachNodeUIs (Transform parent)
 
virtual void descNode_OnUpdateCaption (MapNode n, MapNode.CaptionData data)
 
virtual void DrawSpline ()
 
virtual DrawIcons GetCurrentDrawMode ()
 
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 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 UpdateSpline ()
 

Static Protected Member Functions

static T Setup< T > (string name, int seed, Orbit orbit, bool activedraw=true)
 Setup the inital values for this orbit renderer More...
 

Protected Attributes

bool ANDNVisible
 
const string endColor = "</color>"
 
double relativeInclination
 
string startColor = "<color=#ffffff>"
 
Vessel targetVessel
 
- Protected Attributes inherited from OrbitRenderer
bool orbitDisplayUnlocked
 
- Protected Attributes inherited from OrbitRendererBase
bool draw3dLines
 
double eccOffset
 
int layerMask = 31
 
float lineOpacity
 
Transform nodesParent
 
VectorLine orbitLine
 
float twkOffset
 

Additional Inherited Members

- Public Types inherited from OrbitRendererBase
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 }
 
- Static Protected Attributes inherited from OrbitRendererBase
static double sampleResolution = 2
 
- Properties inherited from OrbitRendererBase
bool isActive [get]
 
bool mouseOver [get]
 
string objName [get, set]
 
Orbit orbit [get]
 
VectorLine OrbitLine [get]
 
Vector3d[] OrbitPoints [get, set]
 

Member Function Documentation

override void OrbitTargetRenderer.ANDNNodes_OnUpdateIcon ( MapNode  n,
MapNode.IconData  data 
)
inlineprotectedvirtual

Reimplemented from OrbitRendererBase.

override Vector3d OrbitTargetRenderer.ascNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual

< Because we are calculating from the contract orbit to the active vessel, the ascend and descend are flipped.

Reimplemented from OrbitRendererBase.

override bool OrbitTargetRenderer.CanDrawAnyIcons ( )
inlineprotectedvirtual

Reimplemented from OrbitRenderer.

void OrbitTargetRenderer.Cleanup ( )
inline
override Vector3d OrbitTargetRenderer.descNode_OnUpdatePosition ( MapNode  n)
inlineprotectedvirtual

< Intentional flip.

Reimplemented from OrbitRendererBase.

static T OrbitTargetRenderer.Setup< T > ( string  name,
int  seed,
Orbit  orbit,
bool  activedraw = true 
)
inlinestaticprotected

Setup the inital values for this orbit renderer

Parameters
nameName of the orbiot renderer GO
seedseed to use to generate the orbit color
orbitOrbot to render
activedrawShould it be active
Returns
An OrbitRenderer based on the OrbitTargetRenderer base class

< We will set up a parent object attached to scaled space.

< The OrbitDriver is not wholly necessary here, as there is no object node to track. It will be set up but disabled afterwards.

Type Constraints
T :OrbitTargetRenderer 
virtual void OrbitTargetRenderer.UpdateLocals ( )
inlineprotectedvirtual

< AN/DN Visibility

Reimplemented in ContractOrbitRenderer.

Member Data Documentation

bool OrbitTargetRenderer.activeDraw
bool OrbitTargetRenderer.ANDNVisible
protected
float OrbitTargetRenderer.animationTimerCurrent
float OrbitTargetRenderer.animationTimerMax = 8f
const string OrbitTargetRenderer.endColor = "</color>"
protected
double OrbitTargetRenderer.relativeInclination
protected
OrbitSnapshot OrbitTargetRenderer.snapshot
string OrbitTargetRenderer.startColor = "<color=#ffffff>"
protected
Vessel OrbitTargetRenderer.targetVessel
protected

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