Simulated Reality SDK 7500c78d v1.30.2.51085 2024-04-26T11:23:03Z
Stable
transformation.h
Go to the documentation of this file.
1
10#pragma once
11
12#include "opencv2/opencv.hpp"
13#include "sr/types.h"
14
15#ifdef WIN32
16# ifdef COMPILING_DLL_SimulatedRealityCore
17# define DIMENCOSR_API __declspec(dllexport)
18# else
19# define DIMENCOSR_API __declspec(dllimport)
20# endif
21#else
22# define DIMENCOSR_API
23#endif
24
25namespace SR {
26
33private:
34 bool verifyRotation();
35
41#pragma warning(push)
42#pragma warning(disable: 4251)
43 cv::Mat scaling;
44 cv::Mat rotation;
45 cv::Mat translation;
46
47 //Combined for efficiency
48 cv::Mat transformation;
49 cv::Mat untransformation;
50#pragma warning(pop)
51
52public:
53 Transformation(cv::Matx31d scaling, cv::Matx33d rotation, cv::Matx31d translation);
54 Transformation(cv::Matx33d rotation, cv::Matx31d translation);
58
59 cv::Mat getRotation();
60 cv::Mat getTranslation();
61 cv::Mat getMatrix();
62
63 cv::Mat apply(cv::Mat points);
64 cv::Mat apply(SR_point3d* points, size_t size);
65 cv::Mat reverse(cv::Mat points);
66};
67
68}
69
70#undef DIMENCOSR_API
Class of objects defining the relation between different coordinate systems.
Definition: transformation.h:32
Transformation(cv::Matx33d rotation, cv::Matx31d translation)
cv::Mat apply(SR_point3d *points, size_t size)
cv::Mat getRotation()
cv::Mat apply(cv::Mat points)
Transformation & operator=(const Transformation &other)
cv::Mat reverse(cv::Mat points)
Transformation(cv::Matx31d scaling, cv::Matx33d rotation, cv::Matx31d translation)
cv::Mat getTranslation()
Transformation(const Transformation &other)
Namespace containing all C++ Simulated Reality classes.
Definition: srconfiguration.h:25
#define DIMENCOSR_API
Definition: transformation.h:22
C-compatible 3d double vector representation.
Definition: types.h:81