Major along U, minor along V; rotationDegrees matches Python atan2(maj·basis_v, maj·basis_u).
| 49 | |
| 50 | // Major along U, minor along V; rotationDegrees matches Python atan2(maj·basis_v, maj·basis_u). |
| 51 | void BuildOrbitEllipseAxes( const EveEllipseDefinition& spec, Vector3& outU, Vector3& outV ) |
| 52 | { |
| 53 | Vector3 basisU, basisV, n; |
| 54 | BuildOrbitPlaneBasisPython( spec.m_planeNormal, basisU, basisV, n ); |
| 55 | const float phiRad = spec.m_rotationDegrees * ( TRI_PI / 180.f ); |
| 56 | const float cf = cosf( phiRad ); |
| 57 | const float sf = sinf( phiRad ); |
| 58 | // unit since basisU and basisV are unit |
| 59 | outU = basisU * cf + basisV * sf; |
| 60 | outV = Cross( outU, n ); |
| 61 | const float lv = Length( outV ); |
| 62 | outV = outV / lv; |
| 63 | } |
| 64 | |
| 65 | } // namespace |
| 66 |
no test coverage detected