5 Instrument(prmX, prmY, prmXScale, prmYScale, prmBus, prmLogger, prmDevice, prmFonts)
21 swprintf_s(str, 99, L
"TP: %5.2f s",
tp);
22 DrawTextW(str, 0, 0, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 128, 128, 255));
25 swprintf_s(str, 99, L
" e: %0.6f",
ec);
27 DrawTextW(str, 0, 22, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 255, 0, 0));
29 DrawTextW(str, 0, 22, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 128, 0, 0));
31 DrawTextW(str, 0, 22, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 0, 128, 0));
36 DrawTextW(L
"aa: HYPERBOLIC", 0, 12, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 255, 0, 0));
40 swprintf_s(str, 99, L
"aa: %4.3f km",
aa);
42 DrawTextW(str, 0, 12, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 128, 0, 0));
44 DrawTextW(str, 0, 12, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 0, 128, 0));
47 swprintf_s(str, 99, L
"ap: %4.3f km",
ap);
51 DrawTextW(L
"ap: SURFACE", 0, 32, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 255, 0, 0));
54 DrawTextW(str, 0, 32, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 255, 0, 0));
55 else if (
ap < 146.98f)
56 DrawTextW(str, 0, 32, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 128, 0, 0));
58 DrawTextW(str, 0, 32, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 0, 128, 0));
60 swprintf_s(str, 99, L
"vo: %3.1f", D3DXToDegree(
vo));
61 DrawTextW(str, 0, 42, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 128, 128, 128));
63 swprintf_s(str, 99, L
" i: %1.6f", D3DXToDegree(
ix));
64 DrawTextW(str, 0, 52, 0, DT_NOCLIP, D3DCOLOR_ARGB(255, 128, 128, 128));
106 D3DXVec3Cross(&
hx, &
rx, &
vx);
109 const float param = powf(D3DXVec3Length(&
hx), 2.0f) /
mu;
111 D3DXVec3Scale(&
ex, &
rx, (powf(D3DXVec3Length(&
vx), 2.0f) -
mu / D3DXVec3Length(&
rx)) /
mu);
112 D3DXVec3Scale(&
tv, &
vx, D3DXVec3Dot(&
rx, &
vx) /
mu);
113 D3DXVec3Subtract(&
ex, &
ex, &
tv);
114 ec = D3DXVec3Length(&
ex);
116 const float rp = param / (1.0f +
ec);
119 const float a = param / (1.0f - powf(
ec, 2.0f));
124 const float ra = 2.0f * a - rp;
126 tp = D3DX_TAU * sqrtf(powf(a, 3.0f) /
mu);
134 const float f_temp = D3DXVec3Dot(&
ex, &
rx) / (
ec * D3DXVec3Length(&
rx));
137 else if (f_temp <= -1.0f)
141 if (D3DXVec3Dot(&
rx, &
vx) < 0.0f)
144 ix = acosf(
hx.z / D3DXVec3Length(&
hx));
void FrameMove(float fElapsed) override
s_network_objects playerships[MAX_SCAN]
const D3DXVECTOR3 northpoleC
Orbit(int prmX, int prmY, float prmXScale, float prmYScale, Bus *prmBus, Logger *prmLogger, DeviceObject *prmDevice, std::vector< Font *> prmFonts)
void AddToCallStack(const char *msg)