-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transform.h
59 lines (46 loc) · 1.9 KB
/
Transform.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#pragma once
#include <iostream>
#include <Eigen/Dense>
#include "Point.h"
#include "PointCloud.h"
using namespace std;
class Transform {
private:
// acilari tutan vector
Eigen::Vector3d *angles;
// orijinler arasındaki uzaklık farkının kordinatlarını veren vektör
Eigen::Vector3d *trans;
// transformation matrixi
Eigen::Matrix4d *transMatrix;
// rotasyon matrisi
Eigen::Matrix3d *rotationMatrix;
public:
// Transform sınıfının constructor fonksiyonu
Transform() {
angles = new Eigen::Vector3d;
trans = new Eigen::Vector3d;
transMatrix = new Eigen::Matrix4d;
rotationMatrix = new Eigen::Matrix3d;
}
// Transform sınıfının destructor fonksiyonu
~Transform();
// Bu fonnksiyon alinan aci degerlerini set eder.
void setAngles(double, double, double);
// Bu fonksiyon alınan açı değerlerini gördüğümüz fonksiyon.
double* getAngles();
// Bu fonksiyon iki kordinat düzleminin orijinleri arasındaki uzaklıkları trans arraye değişken olarak atar.
void setTrans(double, double, double);
// Burada iki kordinat düzlemi arasında uzaklık değerlerini veren x y z değerlerini döndürür.
double* getTrans();
// Bu fonksiyon set edilen angle degerlerini kullanarak rotation matrix i doldurur
void setRotation(double ang[3]);
// Bu fonksiyon bize verilen rotasyon matrisini rotationmatrixe set eder .
void setRotation(Eigen::Matrix3d ang);
void setTranslation(double tr[3]);
void setTranslation(Eigen::Vector3d tr);
// bu fonksiyon 4x4 transform matrisini oluşturur bunun için rotasyonmatrix ve trans nesnesinin x y z sini kullanır
Point doTransform(Point p);
// bu fonksiyon nokta bulutunu dönüştürür, dönüştürülmüş nokta bulutunu döndürür
PointCloud doTransform(PointCloud& pc);
list<Point> doTransform(list<Point> lp);
};