MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / drawCameraIndicator

Method drawCameraIndicator

app/src/UI/Widgets/Plot3D.cpp:758–785  ·  view source on GitHub ↗

* @brief Renders the 3D camera indicator. */

Source from the content-addressed store, hash-verified

756 * @brief Renders the 3D camera indicator.
757 */
758void Widgets::Plot3D::drawCameraIndicator()
759{
760 QMatrix4x4 matrix;
761
762 if (anaglyphEnabled()) {
763 auto eyes = eyeTransformations(matrix);
764
765 eyes.first.rotate(m_cameraAngleX, 1, 0, 0);
766 eyes.first.rotate(m_cameraAngleY, 0, 1, 0);
767 eyes.first.rotate(m_cameraAngleZ, 0, 0, 1);
768
769 eyes.second.rotate(m_cameraAngleX, 1, 0, 0);
770 eyes.second.rotate(m_cameraAngleY, 0, 1, 0);
771 eyes.second.rotate(m_cameraAngleZ, 0, 0, 1);
772
773 m_cameraIndicatorImg[0] = renderCameraIndicator(eyes.first);
774 m_cameraIndicatorImg[1] = renderCameraIndicator(eyes.second);
775 }
776
777 else {
778 matrix.rotate(m_cameraAngleX, 1, 0, 0);
779 matrix.rotate(m_cameraAngleY, 0, 1, 0);
780 matrix.rotate(m_cameraAngleZ, 0, 0, 1);
781 m_cameraIndicatorImg[0] = renderCameraIndicator(matrix);
782 }
783
784 m_dirtyCameraIndicator = false;
785}
786
787//--------------------------------------------------------------------------------------------------
788// Rendering pipeline helpers

Callers

nothing calls this directly

Calls 1

rotateMethod · 0.45

Tested by

no test coverage detected