Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
Krakensbane Class Reference
Inheritance diagram for Krakensbane:

Public Member Functions

void AddExcess (Vector3d vel)
 Adds the excess velocity to the frame velocity and subtracts the excess from all loaded offrails vessels/physobjects More...
 
bool SafeToEngage (out bool safeForFloatingOrigin)
 Will check if it's safe to engage Krakensbane and also (the out argument) whether it's safe to engage Floating Origin. More...
 
void Zero ()
 Zeroes the frame velocity and applies the frame velocity back to all loaded offrails vessels and physobjects More...
 

Static Public Member Functions

static void AddFrameVelocity (Vector3d vel)
 Directly sets additional frame velocity. Notably used when the active vessel comes off rails so Krakensbane is engaged before a frame of imprecise PhysX, since vessels come off rails in Update and otherwise at the start of the next fixed frame the RB velocities would be high (and therefore imprecise). More...
 
static Vector3d GetFrameVelocity ()
 Returns the velocity of the Krakensbane velocity frame. More...
 
static Vector3 GetFrameVelocityV3f ()
 Returns the velocity of the Krakensbane velocity frame as a single-precision vector. More...
 
static Vector3d GetLastCorrection ()
 Returns the last velocity correction performed. More...
 
static void ResetVelocityFrame (bool resetObjects)
 sets the frame velocity back to 0m/s. Use this if setting the worldspace velocity of vessels directly. More...
 

Public Attributes

double altThreshold = 200d
 
double altThresholdAlone = 50d
 
double extraAltOffsetForVel = 100d
 
Vector3d FrameVel
 
double MaxV = 5d
 
double MaxVSqr = double.MaxValue
 

Protected Member Functions

void FixedUpdate ()
 Here we determine if we can engage Krakensbane (and signal FloatingOrigin whether it can engage, too). If we need to disengage Krakensbane, we zero the frame velocity and reapply it to everything. Finally if we have frame velocity, we signal FloatingOrigin how much additional offset to apply to things outside the Krakensbane frame. More...
 
void Start ()
 

Protected Attributes

int loadedVesselsCount
 

Properties

static double SqrThreshold [get]
 

Member Function Documentation

void Krakensbane.AddExcess ( Vector3d  vel)
inline

Adds the excess velocity to the frame velocity and subtracts the excess from all loaded offrails vessels/physobjects

Parameters
vel
static void Krakensbane.AddFrameVelocity ( Vector3d  vel)
inlinestatic

Directly sets additional frame velocity. Notably used when the active vessel comes off rails so Krakensbane is engaged before a frame of imprecise PhysX, since vessels come off rails in Update and otherwise at the start of the next fixed frame the RB velocities would be high (and therefore imprecise).

Parameters
vel
void Krakensbane.FixedUpdate ( )
inlineprotected

Here we determine if we can engage Krakensbane (and signal FloatingOrigin whether it can engage, too). If we need to disengage Krakensbane, we zero the frame velocity and reapply it to everything. Finally if we have frame velocity, we signal FloatingOrigin how much additional offset to apply to things outside the Krakensbane frame.

static Vector3d Krakensbane.GetFrameVelocity ( )
inlinestatic

Returns the velocity of the Krakensbane velocity frame.

Returns
static Vector3 Krakensbane.GetFrameVelocityV3f ( )
inlinestatic

Returns the velocity of the Krakensbane velocity frame as a single-precision vector.

Returns
static Vector3d Krakensbane.GetLastCorrection ( )
inlinestatic

Returns the last velocity correction performed.

Returns
static void Krakensbane.ResetVelocityFrame ( bool  resetObjects)
inlinestatic

sets the frame velocity back to 0m/s. Use this if setting the worldspace velocity of vessels directly.

bool Krakensbane.SafeToEngage ( out bool  safeForFloatingOrigin)
inline

Will check if it's safe to engage Krakensbane and also (the out argument) whether it's safe to engage Floating Origin.

Parameters
safeForFloatingOrigin
Returns
void Krakensbane.Start ( )
inlineprotected
void Krakensbane.Zero ( )
inline

Zeroes the frame velocity and applies the frame velocity back to all loaded offrails vessels and physobjects

Member Data Documentation

double Krakensbane.altThreshold = 200d
double Krakensbane.altThresholdAlone = 50d
double Krakensbane.extraAltOffsetForVel = 100d
Vector3d Krakensbane.FrameVel
int Krakensbane.loadedVesselsCount
protected
double Krakensbane.MaxV = 5d
double Krakensbane.MaxVSqr = double.MaxValue

Property Documentation

double Krakensbane.SqrThreshold
staticget

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