Table of Contents

Class PositionUtils

Namespace
KSP.Tools.PQSFreeCamUtils
Assembly
Assembly-CSharp.dll
public static class PositionUtils
Inheritance
PositionUtils
Inherited Members

Fields

DEG2RAD

public const double DEG2RAD = 0.017453292519943295

Field Value

double

FLOAT_COMPARISON_TOLERANCE

public const float FLOAT_COMPARISON_TOLERANCE = 1E-05

Field Value

float

RAD2DEG

public const double RAD2DEG = 57.29577951308232

Field Value

double

Methods

AreLatLonClose(double, double, double, double, double, float)

public static bool AreLatLonClose(double radius, double pos1Lat, double pos1Lon, double pos2Lat, double pos2Lon, float threshhold)

Parameters

radius double
pos1Lat double
pos1Lon double
pos2Lat double
pos2Lon double
threshhold float

Returns

bool

ComputeCamRotation(QuaternionD, double, double)

public static QuaternionD ComputeCamRotation(QuaternionD orientation, double camAngle, double camPitch)

Parameters

orientation QuaternionD
camAngle double
camPitch double

Returns

QuaternionD

GetHeadingFromOrientationCamAngle(QuaternionD, double)

public static double GetHeadingFromOrientationCamAngle(QuaternionD orientation, double camAngle)

Parameters

orientation QuaternionD
camAngle double

Returns

double

GetLatLonDist(double, double, double, double, double)

public static double GetLatLonDist(double radius, double pos1Lat, double pos1Lon, double pos2Lat, double pos2Lon)

Parameters

radius double
pos1Lat double
pos1Lon double
pos2Lat double
pos2Lon double

Returns

double

GetLonLatFromRadialPos(Vector3d)

public static Vector2d GetLonLatFromRadialPos(Vector3d radialNormal)

Parameters

radialNormal Vector3d

Returns

Vector2d

GetRadialNormalFromLatLon(double, double)

public static Vector3d GetRadialNormalFromLatLon(double lat, double lon)

Parameters

lat double
lon double

Returns

Vector3d

GetUnitVectorFromAngle(double)

public static Vector2d GetUnitVectorFromAngle(double camAngle)

Parameters

camAngle double

Returns

Vector2d

RaycastParametricSphere(double, Vector3d, Vector3d, out double, out double)

public static bool RaycastParametricSphere(double radius, Vector3d rayPos, Vector3d rayDir, out double t1, out double t2)

Parameters

radius double
rayPos Vector3d
rayDir Vector3d
t1 double
t2 double

Returns

bool

TranslateOrientation(QuaternionD, double, double, double, double)

public static QuaternionD TranslateOrientation(QuaternionD orientation, double radius, double angle, double x, double y)

Parameters

orientation QuaternionD
radius double
angle double
x double
y double

Returns

QuaternionD