MCPcopy Create free account
hub / github.com/brenocq/implot3d / FromElAz

Method FromElAz

implot3d.cpp:3657–3665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3655}
3656
3657ImPlot3DQuat 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
3667double ImPlot3DQuat::Length() const { return sqrt(x * x + y * y + z * z + w * w); }
3668

Callers

nothing calls this directly

Calls 1

ImPlot3DPointClass · 0.85

Tested by

no test coverage detected