diff --git a/src/controls/LevelingSensor/QsgNodeUtility.h b/src/controls/LevelingSensor/QsgNodeUtility.h index 11e3ac84..70b26504 100644 --- a/src/controls/LevelingSensor/QsgNodeUtility.h +++ b/src/controls/LevelingSensor/QsgNodeUtility.h @@ -3,7 +3,7 @@ #include #include -namespace qsg +namespace QskSGNode { using NodeType = QSGNode; diff --git a/src/controls/LevelingSensor/QskLevelingSensor.h b/src/controls/LevelingSensor/QskLevelingSensor.h index f077dfb2..b27229bc 100644 --- a/src/controls/LevelingSensor/QskLevelingSensor.h +++ b/src/controls/LevelingSensor/QskLevelingSensor.h @@ -5,17 +5,6 @@ #include #include -/// @brief This control can display the pitch, roll and yaw angles -/// @note x = pitch, y = yaw, z = roll -/// -/// ^y+ -/// | -/// | -/// | -/// +------------->x+ -/// / -/// / -/// v z+ class QSK_EXPORT LevelingSensor : public QskControl { Q_OBJECT @@ -52,7 +41,6 @@ public: Q_REQUIRED_RESULT const TickmarksLabels& tickmarkLabels(Qt::Axis axis) const; Q_REQUIRED_RESULT const QVector3D& angle() const noexcept; private: - /// @brief The sensors rotation per axis: x := roll, y := pitch, z := yaw QVector3D m_rotation; QVector3D m_angle = { 45,45,45 }; Tickmarks m_tickmarks[3]; diff --git a/src/controls/LevelingSensor/QskLevelingSensorSkinlet.cpp b/src/controls/LevelingSensor/QskLevelingSensorSkinlet.cpp index 78bda401..89025b12 100644 --- a/src/controls/LevelingSensor/QskLevelingSensorSkinlet.cpp +++ b/src/controls/LevelingSensor/QskLevelingSensorSkinlet.cpp @@ -27,7 +27,7 @@ using Q = LevelingSensor; using R = LevelingSensorSkinlet::NodeRole; -using namespace qsg; +using namespace QskSGNode; float LevelingSensorSkinlet::radius2(const QskSkinnable* const skinnable) { @@ -137,7 +137,7 @@ QSGNode* LevelingSensorSkinlet::updateSubNode(const LevelingSensor const auto cX = center(sensor).x(); const auto cY = center(sensor).y(); - const auto rZ = sensor->arcMetricsHint(subControl).startAngle(); + const auto rZ = 0.0; const auto matrix = matrix_deg(0.0, 0.0, 0.0, cX, cY, 0) * @@ -157,7 +157,7 @@ QSGNode* LevelingSensorSkinlet::updateSubNode(const LevelingSensor* const auto cX = center(sensor).x(); const auto cY = center(sensor).y(); const auto rX = sensor->rotation().x(); - const auto rZ = sensor->arcMetricsHint(subControl).startAngle(); + const auto rZ = 0.0; const auto dY = 2 * sensor->angle().y(); const auto p = qBound(0.0, 0.5 + (-rX / dY), 1.0); diff --git a/src/controls/LevelingSensor/QskLevelingSensorUtility.h b/src/controls/LevelingSensor/QskLevelingSensorUtility.h index cba2ea20..99d73f9a 100644 --- a/src/controls/LevelingSensor/QskLevelingSensorUtility.h +++ b/src/controls/LevelingSensor/QskLevelingSensorUtility.h @@ -4,6 +4,7 @@ #include #include +#include // create a homogenous transformation matrix inline Q_REQUIRED_RESULT QMatrix4x4 matrix_deg( @@ -51,7 +52,7 @@ inline bool compare_exchange(T& dst, const T& src) template<> inline bool compare_exchange(float& dst, const float& src) { - if (!qFuzzyCompare(dst, src)) + if (!qskFuzzyCompare (dst, src)) { dst = src; return true; @@ -62,7 +63,7 @@ inline bool compare_exchange(float& dst, const float& src) template<> inline bool compare_exchange(qreal& dst, const qreal& src) { - if (!qFuzzyCompare(dst, src)) + if (!qskFuzzyCompare (dst, src)) { dst = src; return true;