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
27{
28 public:
29 QString_QMatrix4x4(QMatrix4x4& mtx)
30 : _matrix(mtx)
31 {}
32
33 operator QString()
34 {
35 return toString(_matrix);
36 }
37
38 QString_QMatrix4x4& operator=(const QString& s)
39 {
40 fromString(_matrix, s);
41 return *this;
42 }
43
44 private:
45 QMatrix4x4& _matrix;
46};
47
48}// namespace sf
49
50_SCN_FUNC std::ostream& operator<<(std::ostream& os, const QMatrix4x4& m);
_SCN_FUNC std::ostream & operator<<(std::ostream &os, const QMatrix4x4 &m)
A helper class that provides conversion between QString and QMatrix4x4. This class acts as a wrapper ...
Definition SceneHelpers.h:27
QString_QMatrix4x4 & operator=(const QString &s)
Definition SceneHelpers.h:38
QString_QMatrix4x4(QMatrix4x4 &mtx)
Definition SceneHelpers.h:29
Definition Application.h:10
void fromString(T &list, const std::string &str, const std::string &separator={})
Converts a string into a typed list.
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