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& At(std::size_t r, std::size_t c)
88 throw std::out_of_range(
"indices must be smaller than 3");
93 const Real& At(std::size_t r, std::size_t c)
const
96 throw std::out_of_range(
"indices must be smaller than 3");
101 Real& operator()(std::size_t r, std::size_t c)
107 const Real& operator()(std::size_t r, std::size_t c)
const
116 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));
123 static Mat3 i(1.0,0.0,0.0,
131 return data_[0][0] == rhs.data_[0][0] &&
132 data_[1][0] == rhs.data_[1][0] &&
133 data_[2][0] == rhs.data_[2][0] &&
134 data_[0][1] == rhs.data_[0][1] &&
135 data_[1][1] == rhs.data_[1][1] &&
136 data_[2][1] == rhs.data_[2][1] &&
137 data_[0][2] == rhs.data_[0][2] &&
138 data_[1][2] == rhs.data_[1][2] &&
139 data_[2][2] == rhs.data_[2][2];
144 data_[0][0]+=rhs(0,0);
145 data_[0][1]+=rhs(0,1);
146 data_[0][2]+=rhs(0,2);
147 data_[1][0]+=rhs(1,0);
148 data_[1][1]+=rhs(1,1);
149 data_[1][2]+=rhs(1,2);
150 data_[2][0]+=rhs(2,0);
151 data_[2][1]+=rhs(2,1);
152 data_[2][2]+=rhs(2,2);
157 data_[0][0]-=rhs(0,0);
158 data_[0][1]-=rhs(0,1);
159 data_[0][2]-=rhs(0,2);
160 data_[1][0]-=rhs(1,0);
161 data_[1][1]-=rhs(1,1);
162 data_[1][2]-=rhs(1,2);
163 data_[2][0]-=rhs(2,0);
164 data_[2][1]-=rhs(2,1);
165 data_[2][2]-=rhs(2,2);
197 (*this)=
Mat3((*
this)(0,0)*m(0,0)+(*
this)(0,1)*m(1,0)+(*
this)(0,2)*m(2,0),
198 (*
this)(0,0)*m(0,1)+(*
this)(0,1)*m(1,1)+(*
this)(0,2)*m(2,1),
199 (*
this)(0,0)*m(0,2)+(*
this)(0,1)*m(1,2)+(*
this)(0,2)*m(2,2),
200 (*
this)(1,0)*m(0,0)+(*
this)(1,1)*m(1,0)+(*
this)(1,2)*m(2,0),
201 (*
this)(1,0)*m(0,1)+(*
this)(1,1)*m(1,1)+(*
this)(1,2)*m(2,1),
202 (*
this)(1,0)*m(0,2)+(*
this)(1,1)*m(1,2)+(*
this)(1,2)*m(2,2),
203 (*
this)(2,0)*m(0,0)+(*
this)(2,1)*m(1,0)+(*
this)(2,2)*m(2,0),
204 (*
this)(2,0)*m(0,1)+(*
this)(2,1)*m(1,1)+(*
this)(2,2)*m(2,1),
205 (*
this)(2,0)*m(0,2)+(*
this)(2,1)*m(1,2)+(*
this)(2,2)*m(2,2));
221 data_[0][0]=i00; data_[0][1]=i01; data_[0][2]=i02;
222 data_[1][0]=i10; data_[1][1]=i11; data_[1][2]=i12;
223 data_[2][0]=i20; data_[2][1]=i21; data_[2][2]=i22;