KSP API
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Krakensbane Class Reference

The physics simulation has problems if vessels move too fast relative to the underlying reference frame used by the simulation, or get too far from the origin of the coordinate system. Krakensbane shifts the reference frame origin and velocity so that the active vessel is always near the origin of, and moving slowly with respect to, the underlying coordinate system used by the physics simulation. More...

Inheritance diagram for Krakensbane:

Public Member Functions

 Krakensbane ()
 
void setOffset (Vector3d offset)
 Moves all vessels not on rails by the given position offset. This will usually only affect the active vessel, unless there are other vessels nearby. The offset can be very large and the vessels will not break, unlike for Vessel.SetPosition. More...
 

Static Public Member Functions

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 ()
 sets the frame velocity back to 0m/s. Use this if setting the worldspace velocity of vessels directly. More...
 

Public Attributes

Vector3d excessV
 
Vector3d FrameVel
 
Vector3d lastCorrection
 
float MaxV
 
Vector3d RBVel
 
Vector3d totalVel
 

Detailed Description

The physics simulation has problems if vessels move too fast relative to the underlying reference frame used by the simulation, or get too far from the origin of the coordinate system. Krakensbane shifts the reference frame origin and velocity so that the active vessel is always near the origin of, and moving slowly with respect to, the underlying coordinate system used by the physics simulation.

Constructor & Destructor Documentation

Krakensbane.Krakensbane ( )

Member Function Documentation

static Vector3d Krakensbane.GetFrameVelocity ( )
static

Returns the velocity of the Krakensbane velocity frame.

Returns
static Vector3 Krakensbane.GetFrameVelocityV3f ( )
static

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

Returns
static Vector3d Krakensbane.GetLastCorrection ( )
static

Returns the last velocity correction performed.

Returns
static void Krakensbane.ResetVelocityFrame ( )
static

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

void Krakensbane.setOffset ( Vector3d  offset)

Moves all vessels not on rails by the given position offset. This will usually only affect the active vessel, unless there are other vessels nearby. The offset can be very large and the vessels will not break, unlike for Vessel.SetPosition.

Parameters
offset

Member Data Documentation

Vector3d Krakensbane.excessV
Vector3d Krakensbane.FrameVel
Vector3d Krakensbane.lastCorrection
float Krakensbane.MaxV
Vector3d Krakensbane.RBVel
Vector3d Krakensbane.totalVel

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