27 #include <boost/operators.hpp>
36 private boost::equality_comparable<Mat3>,
37 private boost::additive1<Mat3>,
38 private boost::multiplicative2<Mat3, Real>
44 this->
set(1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0);
60 this->
set(i00,i01,i02,i10,i11,i12,i20,i21,i22);
65 this->
set(m(0,0),m(0,1),m(0,2),m(1,0),m(1,1),m(1,2),m(2,0),m(2,1),m(2,2));
70 this->
set(m(0, 0), m(0, 1),
Real(0.0),
71 m(1, 0), m(1, 1),
Real(0.0),
77 this->
set(arr[0],arr[1],arr[2],arr[3],arr[4],arr[5],arr[6],arr[7],arr[8]);
82 this->
set(x, 0.0, 0.0, 0.0, y, 0.0, 0.0, 0.0, z);
85 Real& operator()(std::size_t r, std::size_t c)
88 throw std::out_of_range(
"row and column must be in the range [0-2]");
93 const Real& operator()(std::size_t r, std::size_t c)
const
96 throw std::out_of_range(
"row and column must be in the range [0-2]");
104 this->
set(m(0,0),m(0,1),m(0,2),m(1,0),m(1,1),m(1,2),m(2,0),m(2,1),m(2,2));
111 static Mat3 i(1.0,0.0,0.0,
119 return data_[0][0] == rhs.data_[0][0] &&
120 data_[1][0] == rhs.data_[1][0] &&
121 data_[2][0] == rhs.data_[2][0] &&
122 data_[0][1] == rhs.data_[0][1] &&
123 data_[1][1] == rhs.data_[1][1] &&
124 data_[2][1] == rhs.data_[2][1] &&
125 data_[0][2] == rhs.data_[0][2] &&
126 data_[1][2] == rhs.data_[1][2] &&
127 data_[2][2] == rhs.data_[2][2];
132 data_[0][0]+=rhs(0,0);
133 data_[0][1]+=rhs(0,1);
134 data_[0][2]+=rhs(0,2);
135 data_[1][0]+=rhs(1,0);
136 data_[1][1]+=rhs(1,1);
137 data_[1][2]+=rhs(1,2);
138 data_[2][0]+=rhs(2,0);
139 data_[2][1]+=rhs(2,1);
140 data_[2][2]+=rhs(2,2);
145 data_[0][0]-=rhs(0,0);
146 data_[0][1]-=rhs(0,1);
147 data_[0][2]-=rhs(0,2);
148 data_[1][0]-=rhs(1,0);
149 data_[1][1]-=rhs(1,1);
150 data_[1][2]-=rhs(1,2);
151 data_[2][0]-=rhs(2,0);
152 data_[2][1]-=rhs(2,1);
153 data_[2][2]-=rhs(2,2);
185 (*this)=
Mat3((*
this)(0,0)*m(0,0)+(*
this)(0,1)*m(1,0)+(*
this)(0,2)*m(2,0),
186 (*
this)(0,0)*m(0,1)+(*
this)(0,1)*m(1,1)+(*
this)(0,2)*m(2,1),
187 (*
this)(0,0)*m(0,2)+(*
this)(0,1)*m(1,2)+(*
this)(0,2)*m(2,2),
188 (*
this)(1,0)*m(0,0)+(*
this)(1,1)*m(1,0)+(*
this)(1,2)*m(2,0),
189 (*
this)(1,0)*m(0,1)+(*
this)(1,1)*m(1,1)+(*
this)(1,2)*m(2,1),
190 (*
this)(1,0)*m(0,2)+(*
this)(1,1)*m(1,2)+(*
this)(1,2)*m(2,2),
191 (*
this)(2,0)*m(0,0)+(*
this)(2,1)*m(1,0)+(*
this)(2,2)*m(2,0),
192 (*
this)(2,0)*m(0,1)+(*
this)(2,1)*m(1,1)+(*
this)(2,2)*m(2,1),
193 (*
this)(2,0)*m(0,2)+(*
this)(2,1)*m(1,2)+(*
this)(2,2)*m(2,2));
209 data_[0][0]=i00; data_[0][1]=i01; data_[0][2]=i02;
210 data_[1][0]=i10; data_[1][1]=i11; data_[1][2]=i12;
211 data_[2][0]=i20; data_[2][1]=i21; data_[2][2]=i22;