C# 클래스 Kramax.Utility.Utils

파일 보기 프로젝트 열기: Kramax/KramaxAutoPilot

공개 메소드들

메소드 설명
Clamp ( this val, double min, double max ) : double
Clamp ( this val, float min, float max ) : float
CurrentAngleTargetRel ( double current, double target, double maxAngle ) : double

calculates the angle to feed corrected for 0/360 crossings eg. if the target is 350 and the current is 10, it will return 370 giving a diff of -20 degrees else you get +ve 340 and the turn is in the wrong direction

IsNeutral ( AxisBinding axis ) : bool
SpeedUnitToMSec ( this speedUnit, SpeedMode mode, SpeedUnits units, Vessel vessel ) : double
TryGetValue ( this node, string key, KeyCode defaultValue ) : KeyCode
TryGetValue ( this node, string key, Rect defaultValue ) : Rect
TryGetValue ( this node, string key, bool defaultValue ) : bool
TryGetValue ( this node, string key, double defaultValue ) : double
TryGetValue ( this node, string key, float defaultValue ) : float
TryGetValue ( this node, string key, int defaultValue ) : int
TryGetValue ( this node, string key, string defaultValue ) : string
calcStagnationPres ( Vessel vessel ) : double
calculateTargetHeading ( Quaternion rotation, Vessel vessel, VesselData vdata ) : double

calculate current heading from plane rotation

calculateTargetHeading ( Vector3 direction, VesselData vdata ) : double

calculate current heading from plane normal vector

getPlaneNormal ( Quaternion rotation, Vessel vessel ) : Vector3
getPlaneRotation ( Vector3 planeNormal, Vessel vessel ) : Quaternion

calculate the planet relative rotation from the plane normal vector

getPlaneRotation ( double heading, Vessel vessel, VesselData vdata ) : Quaternion
hasPitchInput ( ) : bool
hasRollInput ( ) : bool
hasThrottleInput ( ) : bool
hasYawInput ( ) : bool
headingClamp ( this valToClamp, double maxHeading ) : double

Circular rounding to keep compass measurements within a 360 degree range maxHeading is the top limit, bottom limit is maxHeading - 360

mSecToSpeedUnit ( this mSec, SpeedMode mode, SpeedUnits units, Vessel vessel ) : double
projectOnPlane ( this vector, UnityEngine.Vector3d planeNormal ) : UnityEngine.Vector3d
speedUnitTransform ( SpeedUnits units, double soundSpeed ) : double
unitString ( SpeedUnits unit ) : string
vecHeading ( double target, VesselData vdata ) : Vector3

Plane normal vector from a given heading (surface right vector)

메소드 상세

Clamp() 공개 정적인 메소드

public static Clamp ( this val, double min, double max ) : double
val this
min double
max double
리턴 double

Clamp() 공개 정적인 메소드

public static Clamp ( this val, float min, float max ) : float
val this
min float
max float
리턴 float

CurrentAngleTargetRel() 공개 정적인 메소드

calculates the angle to feed corrected for 0/360 crossings eg. if the target is 350 and the current is 10, it will return 370 giving a diff of -20 degrees else you get +ve 340 and the turn is in the wrong direction
public static CurrentAngleTargetRel ( double current, double target, double maxAngle ) : double
current double
target double
maxAngle double
리턴 double

IsNeutral() 공개 정적인 메소드

public static IsNeutral ( AxisBinding axis ) : bool
axis AxisBinding
리턴 bool

SpeedUnitToMSec() 공개 정적인 메소드

public static SpeedUnitToMSec ( this speedUnit, SpeedMode mode, SpeedUnits units, Vessel vessel ) : double
speedUnit this
mode SpeedMode
units SpeedUnits
vessel Vessel
리턴 double

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, KeyCode defaultValue ) : KeyCode
node this
key string
defaultValue KeyCode
리턴 KeyCode

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, Rect defaultValue ) : Rect
node this
key string
defaultValue UnityEngine.Rect
리턴 UnityEngine.Rect

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, bool defaultValue ) : bool
node this
key string
defaultValue bool
리턴 bool

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, double defaultValue ) : double
node this
key string
defaultValue double
리턴 double

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, float defaultValue ) : float
node this
key string
defaultValue float
리턴 float

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, int defaultValue ) : int
node this
key string
defaultValue int
리턴 int

TryGetValue() 공개 정적인 메소드

public static TryGetValue ( this node, string key, string defaultValue ) : string
node this
key string
defaultValue string
리턴 string

calcStagnationPres() 공개 정적인 메소드

public static calcStagnationPres ( Vessel vessel ) : double
vessel Vessel
리턴 double

calculateTargetHeading() 공개 정적인 메소드

calculate current heading from plane rotation
public static calculateTargetHeading ( Quaternion rotation, Vessel vessel, VesselData vdata ) : double
rotation UnityEngine.Quaternion
vessel Vessel
vdata VesselData
리턴 double

calculateTargetHeading() 공개 정적인 메소드

calculate current heading from plane normal vector
public static calculateTargetHeading ( Vector3 direction, VesselData vdata ) : double
direction Vector3
vdata VesselData
리턴 double

getPlaneNormal() 공개 정적인 메소드

public static getPlaneNormal ( Quaternion rotation, Vessel vessel ) : Vector3
rotation UnityEngine.Quaternion
vessel Vessel
리턴 Vector3

getPlaneRotation() 공개 정적인 메소드

calculate the planet relative rotation from the plane normal vector
public static getPlaneRotation ( Vector3 planeNormal, Vessel vessel ) : Quaternion
planeNormal Vector3
vessel Vessel
리턴 UnityEngine.Quaternion

getPlaneRotation() 공개 정적인 메소드

public static getPlaneRotation ( double heading, Vessel vessel, VesselData vdata ) : Quaternion
heading double
vessel Vessel
vdata VesselData
리턴 UnityEngine.Quaternion

hasPitchInput() 공개 정적인 메소드

public static hasPitchInput ( ) : bool
리턴 bool

hasRollInput() 공개 정적인 메소드

public static hasRollInput ( ) : bool
리턴 bool

hasThrottleInput() 공개 정적인 메소드

public static hasThrottleInput ( ) : bool
리턴 bool

hasYawInput() 공개 정적인 메소드

public static hasYawInput ( ) : bool
리턴 bool

headingClamp() 공개 정적인 메소드

Circular rounding to keep compass measurements within a 360 degree range maxHeading is the top limit, bottom limit is maxHeading - 360
public static headingClamp ( this valToClamp, double maxHeading ) : double
valToClamp this
maxHeading double
리턴 double

mSecToSpeedUnit() 공개 정적인 메소드

public static mSecToSpeedUnit ( this mSec, SpeedMode mode, SpeedUnits units, Vessel vessel ) : double
mSec this
mode SpeedMode
units SpeedUnits
vessel Vessel
리턴 double

projectOnPlane() 공개 정적인 메소드

public static projectOnPlane ( this vector, UnityEngine.Vector3d planeNormal ) : UnityEngine.Vector3d
vector this
planeNormal UnityEngine.Vector3d
리턴 UnityEngine.Vector3d

speedUnitTransform() 공개 정적인 메소드

public static speedUnitTransform ( SpeedUnits units, double soundSpeed ) : double
units SpeedUnits
soundSpeed double
리턴 double

unitString() 공개 정적인 메소드

public static unitString ( SpeedUnits unit ) : string
unit SpeedUnits
리턴 string

vecHeading() 공개 정적인 메소드

Plane normal vector from a given heading (surface right vector)
public static vecHeading ( double target, VesselData vdata ) : Vector3
target double
vdata VesselData
리턴 Vector3