| 3655 | } |
| 3656 | |
| 3657 | ImPlot3DQuat ImPlot3DQuat::FromElAz(double elevation, double azimuth) { |
| 3658 | // Create quaternions for azimuth and elevation |
| 3659 | ImPlot3DQuat azimuth_quat(azimuth, ImPlot3DPoint(0.0, 0.0, 1.0)); // Rotate around Z-axis |
| 3660 | ImPlot3DQuat elevation_quat(elevation, ImPlot3DPoint(1.0, 0.0, 0.0)); // Rotate around X-axis |
| 3661 | ImPlot3DQuat zero_quat(-IM_PI / 2, ImPlot3DPoint(1.0, 0.0, 0.0)); // Rotate to zero azimuth/elevation orientation |
| 3662 | |
| 3663 | // Combine rotations |
| 3664 | return elevation_quat * zero_quat * azimuth_quat; |
| 3665 | } |
| 3666 | |
| 3667 | double ImPlot3DQuat::Length() const { return sqrt(x * x + y * y + z * z + w * w); } |
| 3668 |
nothing calls this directly
no test coverage detected