MNE-CPP  beta 1.0
fiff_coord_trans.cpp
Go to the documentation of this file.
1 //=============================================================================================================
36 //*************************************************************************************************************
37 //=============================================================================================================
38 // INCLUDES
39 //=============================================================================================================
40 
41 #include "fiff_coord_trans.h"
42 
43 
44 //*************************************************************************************************************
45 //=============================================================================================================
46 // USED NAMESPACES
47 //=============================================================================================================
48 
49 using namespace FIFFLIB;
50 
51 
52 //*************************************************************************************************************
53 //=============================================================================================================
54 // DEFINE MEMBER METHODS
55 //=============================================================================================================
56 
58 : from(-1)
59 , to(-1)
60 , trans(MatrixXf::Identity(4,4))
61 , invtrans(MatrixXf::Identity(4,4))
62 {
63 }
64 
65 
66 //*************************************************************************************************************
67 
69 : from(p_FiffCoordTrans.from)
70 , to(p_FiffCoordTrans.to)
71 , trans(p_FiffCoordTrans.trans)
72 , invtrans(p_FiffCoordTrans.invtrans)
73 {
74 }
75 
76 
77 //*************************************************************************************************************
78 
80 {
81 }
82 
83 
84 //*************************************************************************************************************
85 
87 {
88  from = -1;
89  to = -1;
90  trans.setIdentity();
91  invtrans.setIdentity();
92 }
93 
94 
95 //*************************************************************************************************************
96 
98 {
99  fiff_int_t from_new = this->to;
100  this->to = this->from;
101  this->from = from_new;
102  this->trans = this->trans.inverse();
103  this->invtrans = this->invtrans.inverse();
104 
105  return true;
106 }
Matrix< float, 4, 4, DontAlign > invtrans
Definition: fiff.h:98
Coordinate transformation description.
FiffCoordTrans class declaration.
Matrix< float, 4, 4, DontAlign > trans