C# Class kOS.Suffixed.BodyTarget

Inheritance: kOS.Suffixed.SpecialValue
ファイルを表示 Open project: KSP-KOS/KOS Class Usage Examples

Public Methods

Method Description
AltitudeFromPosition ( kOS.Suffixed.Vector position ) : ScalarValue

Interpret the vector given as a 3D position, and return the altitude above sea level of this body.

BodyTarget ( ) : System
BodyTarget ( CelestialBody body, SharedObjects shareObj ) : System
BodyTarget ( string name, SharedObjects shareObj ) : System
Dump ( ) : Dump
Equals ( object obj ) : bool
GeoCoordinatesFromPosition ( kOS.Suffixed.Vector position ) : GeoCoordinates

Interpret the vector given as a 3D position, and return the geocoordinates directly underneath it on this body.

GetDistance ( ) : double
GetHashCode ( ) : int
GetName ( ) : StringValue
GetNorthVector ( ) : kOS.Suffixed.Vector
GetOrbitAtUT ( double desiredUT ) : Orbit
GetPosition ( ) : kOS.Suffixed.Vector
GetPositionAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : kOS.Suffixed.Vector
GetSuffix ( string suffixName ) : ISuffixResult
GetUpVector ( ) : kOS.Suffixed.Vector
GetVelocities ( ) : OrbitableVelocity
GetVelocitiesAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : OrbitableVelocity
LoadDump ( Dump dump ) : void
SetSharedObjects ( SharedObjects sharedObjects ) : void
ToString ( ) : string
operator ( ) : bool

Protected Methods

Method Description
Equals ( BodyTarget other ) : bool

Private Methods

Method Description
BodyInitializeSuffixes ( ) : void
RawAngularVelFromRelative ( Vector3 angularVelFromKSP ) : kOS.Suffixed.Vector

Annoyingly, KSP returns CelestialBody.angularVelociy in a frame of reference relative to the ship facing instead of the universe facing. This would be wonderful if that was their philosophy everywhere, but it's not - its just a weird exception for this one case. This transforms it back into raw universe axes again:

Method Details

AltitudeFromPosition() public method

Interpret the vector given as a 3D position, and return the altitude above sea level of this body.
public AltitudeFromPosition ( kOS.Suffixed.Vector position ) : ScalarValue
position kOS.Suffixed.Vector Vector to use as the 3D position in ship-raw coords
return ScalarValue

BodyTarget() public method

public BodyTarget ( ) : System
return System

BodyTarget() public method

public BodyTarget ( CelestialBody body, SharedObjects shareObj ) : System
body CelestialBody
shareObj SharedObjects
return System

BodyTarget() public method

public BodyTarget ( string name, SharedObjects shareObj ) : System
name string
shareObj SharedObjects
return System

Dump() public method

public Dump ( ) : Dump
return Dump

Equals() protected method

protected Equals ( BodyTarget other ) : bool
other BodyTarget
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GeoCoordinatesFromPosition() public method

Interpret the vector given as a 3D position, and return the geocoordinates directly underneath it on this body.
public GeoCoordinatesFromPosition ( kOS.Suffixed.Vector position ) : GeoCoordinates
position kOS.Suffixed.Vector Vector to use as the 3D position in ship-raw coords
return GeoCoordinates

GetDistance() public method

public GetDistance ( ) : double
return double

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetName() public method

public GetName ( ) : StringValue
return StringValue

GetNorthVector() public method

public GetNorthVector ( ) : kOS.Suffixed.Vector
return kOS.Suffixed.Vector

GetOrbitAtUT() public method

public GetOrbitAtUT ( double desiredUT ) : Orbit
desiredUT double
return Orbit

GetPosition() public method

public GetPosition ( ) : kOS.Suffixed.Vector
return kOS.Suffixed.Vector

GetPositionAtUT() public method

public GetPositionAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : kOS.Suffixed.Vector
timeStamp kOS.Suffixed.TimeSpan
return kOS.Suffixed.Vector

GetSuffix() public method

public GetSuffix ( string suffixName ) : ISuffixResult
suffixName string
return ISuffixResult

GetUpVector() public method

public GetUpVector ( ) : kOS.Suffixed.Vector
return kOS.Suffixed.Vector

GetVelocities() public method

public GetVelocities ( ) : OrbitableVelocity
return OrbitableVelocity

GetVelocitiesAtUT() public method

public GetVelocitiesAtUT ( kOS.Suffixed.TimeSpan timeStamp ) : OrbitableVelocity
timeStamp kOS.Suffixed.TimeSpan
return OrbitableVelocity

LoadDump() public method

public LoadDump ( Dump dump ) : void
dump Dump
return void

SetSharedObjects() public method

public SetSharedObjects ( SharedObjects sharedObjects ) : void
sharedObjects SharedObjects
return void

ToString() public method

public ToString ( ) : string
return string

operator() public static method

public static operator ( ) : bool
return bool