Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
SceneHelpers.h
Go to the documentation of this file.
1#pragma once
2#include <QMatrix4x4>
3#include <scn/iface/global.h>
4
5namespace sf
6{
7
12_SCN_FUNC QString toString(const QMatrix4x4& mtx);
13
18_SCN_FUNC void fromString(QMatrix4x4& mtx, const QString& str);
19
21{
22 public:
23 QString_QMatrix4x4(QMatrix4x4& mtx)
24 : _matrix(mtx)
25 {}
26
27 operator QString()
28 {
29 return toString(_matrix);
30 }
31
32 QString_QMatrix4x4& operator=(const QString& s)
33 {
34 fromString(_matrix, s);
35 return *this;
36 }
37
38 private:
39 QMatrix4x4& _matrix;
40};
41
42}// namespace sf
43
44_SCN_FUNC std::ostream& operator<<(std::ostream& os, const QMatrix4x4& m);
_SCN_FUNC std::ostream & operator<<(std::ostream &os, const QMatrix4x4 &m)
Definition SceneHelpers.h:21
QString_QMatrix4x4 & operator=(const QString &s)
Definition SceneHelpers.h:32
QString_QMatrix4x4(QMatrix4x4 &mtx)
Definition SceneHelpers.h:23
Definition Application.h:10
_SCN_FUNC void fromString(QMatrix4x4 &mtx, const QString &str)
Converts a QString to a QMatrix4x4 type. Allows using the QMatrix4x4 type to be serialized as a prope...
std::string toString(T value, int digits=0)
The function converts number to a minimal length. It produces 'digits' significant digits in either p...
#define _SCN_FUNC
Definition scn/iface/global.h:34