rename qsg namespace
This commit is contained in:
parent
95f6a25094
commit
ff39396e47
|
@ -3,7 +3,7 @@
|
|||
#include <QSGNode>
|
||||
#include <type_traits>
|
||||
|
||||
namespace qsg
|
||||
namespace QskSGNode
|
||||
{
|
||||
using NodeType = QSGNode;
|
||||
|
||||
|
|
|
@ -5,17 +5,6 @@
|
|||
#include <QVector3D>
|
||||
#include <QskAspect.h>
|
||||
|
||||
/// @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];
|
||||
|
|
|
@ -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<R::OuterDisk>(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<R::Horizon>(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);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <qmatrix4x4.h>
|
||||
|
||||
#include <QskScaleTickmarks.h>
|
||||
#include <QskFunctions.h>
|
||||
|
||||
// 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>(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>(float& dst, const float& src)
|
|||
template<>
|
||||
inline bool compare_exchange<qreal>(qreal& dst, const qreal& src)
|
||||
{
|
||||
if (!qFuzzyCompare(dst, src))
|
||||
if (!qskFuzzyCompare (dst, src))
|
||||
{
|
||||
dst = src;
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue