|
delegate void | CelestialBodyDelegate (CelestialBody body) |
|
bool | CheckDominantBody (Vector3d refPos) |
|
void | OnRailsSOITransition (Orbit ownOrbit, CelestialBody to) |
|
void | RecalculateOrbit (CelestialBody newReferenceBody) |
|
void | SetOrbitMode (UpdateMode mode) |
|
void | TrackRigidbody (CelestialBody refBody, double fdtOffset) |
| This method updates keplerian parameters from given vessel's position and velocity in worldspace with respect to the reference body. It can also be passed a refbody which is not the current referenceBody; this is for calculating new keplerian parameters when changing frames of reference. NOTE: This normally runs before PhysX integration, which means before our current velocity is applied to our position. However, when on rails, we are pushing a new position and velocity and so when OrbitDriver is running they are correct for the given UT. VesselPrecalculate will also at times run this after PhysX integration runs (i.e. it will run this on its Update, and then not run it on the following fixed frame). So we need to decide: Are we computing our orbit pre-integration or post? If we are computing pre-integration, we need to use the last frame's timestamp when passing our position and velocity in. More...
|
|
void | updateFromParameters () |
|
void | UpdateOrbit (bool offset=true) |
|
Enumerator |
---|
TRACK_Phys |
|
UPDATE |
|
IDLE |
|
delegate void OrbitDriver.CelestialBodyDelegate |
( |
CelestialBody |
body | ) |
|
bool OrbitDriver.CheckDominantBody |
( |
Vector3d |
refPos | ) |
|
|
inline |
< initial guess
< find the exact moment of SOI transition (must have happened sometime between the last frame and now)
void OrbitDriver.RecalculateOrbit |
( |
CelestialBody |
newReferenceBody | ) |
|
|
inline |
< Unlike scenarios (progress, contracts, etc), modules won't respond if unloaded. ModuleTripLogger needs to recognize this event.
void OrbitDriver.TrackRigidbody |
( |
CelestialBody |
refBody, |
|
|
double |
fdtOffset |
|
) |
| |
|
inline |
This method updates keplerian parameters from given vessel's position and velocity in worldspace with respect to the reference body. It can also be passed a refbody which is not the current referenceBody; this is for calculating new keplerian parameters when changing frames of reference. NOTE: This normally runs before PhysX integration, which means before our current velocity is applied to our position. However, when on rails, we are pushing a new position and velocity and so when OrbitDriver is running they are correct for the given UT. VesselPrecalculate will also at times run this after PhysX integration runs (i.e. it will run this on its Update, and then not run it on the following fixed frame). So we need to decide: Are we computing our orbit pre-integration or post? If we are computing pre-integration, we need to use the last frame's timestamp when passing our position and velocity in.
- Parameters
-
refBody | the ref body to compute against (may not be current referenceBody) |
fdtOffset | the offset to the current UT to apply when computing the orbit. Per above this may be (last frame UT - this frame UT) since the pos and vel are from the last frame's UT during integration |
< convert the rigidbody vectors into the proper coordinate space (Z-up, centered at reference body)
< orbital pos wrt old reference body
< our pos and vel in this case are not set until
< convert from rot to inertial
void OrbitDriver.updateFromParameters |
( |
| ) |
|
|
inline |
void OrbitDriver.UpdateOrbit |
( |
bool |
offset = true | ) |
|
|
inline |
bool OrbitDriver.drawOrbit |
Transform OrbitDriver.driverTransform |
bool OrbitDriver.frameShift |
UpdateMode OrbitDriver.lastMode = UpdateMode.TRACK_Phys |
double OrbitDriver.lastTrackUT |
float OrbitDriver.lowerCamVsSmaRatio = 0.03f |
Color OrbitDriver.orbitColor = Color.grey |
bool OrbitDriver.QueuedUpdate |
float OrbitDriver.upperCamVsSmaRatio = 25f |
True when the OrbitDriver has been started and initialized.
The documentation for this class was generated from the following file: