C# 클래스 kOS.Suffixed.VectorRenderer

상속: Structure, IUpdateObserver, IKOSScopeObserver
파일 보기 프로젝트 열기: KSP-KOS/KOS 1 사용 예제들

공개 메소드들

메소드 설명
ClearAll ( kOS.Safe.UpdateHandler handler ) : void

Make all vector renderers invisible everywhere in the kOS module.

Dispose ( ) : void
GetShow ( ) : bool
KOSUpdate ( double deltaTime ) : void

Move the origin point of the vector drawings to move with the current ship, whichever ship that happens to be at the moment, and move to wherever that ship is within its local XYZ world (which isn't always at (0,0,0), as it turns out.):

RenderColor ( ) : void

Calculates colors and applies transparency fade effect. Only needs to be called when the color changes.

RenderPointCoords ( ) : void

Assign the arrow and label's positions in space. Call whenever :VEC, :START, or :SCALE change, or when the game switches between flight view and map view, as they don't use the same size scale.

RenderValues ( ) : void
ScopeLost ( ) : void
SetLabel ( kOS.Safe.Encapsulation.StringValue newVal ) : void
SetLayer ( int newVal ) : void
SetShow ( BooleanValue newShowVal ) : void
ToString ( ) : string
VectorRenderer ( kOS.Safe.UpdateHandler updateHand, kOS.Safe.SharedObjects shared ) : System

비공개 메소드들

메소드 설명
GetCamData ( ) : void

Update camera data, abstracting the different ways KSP does it depending on view mode:

GetShipCenterCoords ( ) : void

Update _shipCenterCoords, abstracting the different ways to do it depending on view mode:

GetViewportPosFor ( Vector3 v ) : Vector3

Get the position in screen coordinates that the 3d world coordinates project onto, abstracting the two different ways KSP has to access the camera depending on view mode. Returned coords are in a system where the screen viewport goes from (0,0) to (1,1) and the Z coord is how far from the screen it is (-Z means behind you).

InitializeSuffixes ( ) : void
LabelPlacement ( ) : void

Place the 2D label at the correct projected spot on the screen from its location in 3D space:

PutAtShipRelativeCoords ( ) : void

Position the origins of the objects that make up the arrow such that they anchor relative to current ship position.

메소드 상세

ClearAll() 공개 정적인 메소드

Make all vector renderers invisible everywhere in the kOS module.
public static ClearAll ( kOS.Safe.UpdateHandler handler ) : void
handler kOS.Safe.UpdateHandler
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

GetShow() 공개 메소드

public GetShow ( ) : bool
리턴 bool

KOSUpdate() 공개 메소드

Move the origin point of the vector drawings to move with the current ship, whichever ship that happens to be at the moment, and move to wherever that ship is within its local XYZ world (which isn't always at (0,0,0), as it turns out.):
public KOSUpdate ( double deltaTime ) : void
deltaTime double
리턴 void

RenderColor() 공개 메소드

Calculates colors and applies transparency fade effect. Only needs to be called when the color changes.
public RenderColor ( ) : void
리턴 void

RenderPointCoords() 공개 메소드

Assign the arrow and label's positions in space. Call whenever :VEC, :START, or :SCALE change, or when the game switches between flight view and map view, as they don't use the same size scale.
public RenderPointCoords ( ) : void
리턴 void

RenderValues() 공개 메소드

public RenderValues ( ) : void
리턴 void

ScopeLost() 공개 메소드

public ScopeLost ( ) : void
리턴 void

SetLabel() 공개 메소드

public SetLabel ( kOS.Safe.Encapsulation.StringValue newVal ) : void
newVal kOS.Safe.Encapsulation.StringValue
리턴 void

SetLayer() 공개 메소드

public SetLayer ( int newVal ) : void
newVal int
리턴 void

SetShow() 공개 메소드

public SetShow ( BooleanValue newShowVal ) : void
newShowVal kOS.Safe.Encapsulation.BooleanValue
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

VectorRenderer() 공개 메소드

public VectorRenderer ( kOS.Safe.UpdateHandler updateHand, kOS.Safe.SharedObjects shared ) : System
updateHand kOS.Safe.UpdateHandler
shared kOS.Safe.SharedObjects
리턴 System