38 #ifndef FCL_CCD_TAYLOR_MATRIX_INL_H 
   39 #define FCL_CCD_TAYLOR_MATRIX_INL_H 
   89   setTimeInterval(time_interval);
 
  102 template <
typename S>
 
  111 template <
typename S>
 
  120 template <
typename S>
 
  124   v_[0][0].coeff(0) = 1;
 
  125   v_[1][1].coeff(0) = 1;
 
  126   v_[2][2].coeff(0) = 1;
 
  131 template <
typename S>
 
  140 template <
typename S>
 
  147 template <
typename S>
 
  154 template <
typename S>
 
  161 template <
typename S>
 
  168 template <
typename S>
 
  176                   TVector3<S>(v_[1].dot(mc0), v_[1].dot(mc1), v_[1].dot(mc2)),
 
  177                   TVector3<S>(v_[2].dot(mc0), v_[2].dot(mc1), v_[2].dot(mc2)));
 
  181 template <
typename S>
 
  184   return TVector3<S>(v_[0].dot(v), v_[1].dot(v), v_[2].dot(v));
 
  188 template <
typename S>
 
  191   return TVector3<S>(v_[0].dot(v), v_[1].dot(v), v_[2].dot(v));
 
  195 template <
typename S>
 
  203                   TVector3<S>(v_[1].dot(mc0), v_[1].dot(mc1), v_[1].dot(mc2)),
 
  204                   TVector3<S>(v_[2].dot(mc0), v_[2].dot(mc1), v_[2].dot(mc2)));
 
  208 template <
typename S>
 
  211   return TMatrix3(v_[0] * d, v_[1] * d, v_[2] * d);
 
  215 template <
typename S>
 
  218   return TMatrix3(v_[0] * d, v_[1] * d, v_[2] * d);
 
  222 template <
typename S>
 
  229   v_[0] = 
TVector3<S>(v_[0].dot(mc0), v_[0].dot(mc1), v_[0].dot(mc2));
 
  230   v_[1] = 
TVector3<S>(v_[1].dot(mc0), v_[1].dot(mc1), v_[1].dot(mc2));
 
  231   v_[2] = 
TVector3<S>(v_[2].dot(mc0), v_[2].dot(mc1), v_[2].dot(mc2));
 
  236 template <
typename S>
 
  243   v_[0] = 
TVector3<S>(v_[0].dot(mc0), v_[0].dot(mc1), v_[0].dot(mc2));
 
  244   v_[1] = 
TVector3<S>(v_[1].dot(mc0), v_[1].dot(mc1), v_[1].dot(mc2));
 
  245   v_[2] = 
TVector3<S>(v_[2].dot(mc0), v_[2].dot(mc1), v_[2].dot(mc2));
 
  251 template <
typename S>
 
  261 template <
typename S>
 
  271 template <
typename S>
 
  274   return TMatrix3(v_[0] + m.
v_[0], v_[1] + m.
v_[1], v_[2] + m.
v_[2]);
 
  278 template <
typename S>
 
  288 template <
typename S>
 
  297 template <
typename S>
 
  300   for(std::size_t i = 0; i < 3; ++i)
 
  302     for(std::size_t j = 0; j < 3; ++j)
 
  310 template <
typename S>
 
  313   return TMatrix3(v_[0] - m.
v_[0], v_[1] - m.
v_[1], v_[2] - m.
v_[2]);
 
  317 template <
typename S>
 
  327 template <
typename S>
 
  336 template <
typename S>
 
  339   for(std::size_t i = 0; i < 3; ++i)
 
  341     for(std::size_t j = 0; j < 3; ++j)
 
  349 template <
typename S>
 
  356 template <
typename S>
 
  359   getColumn(0).print();
 
  360   getColumn(1).print();
 
  361   getColumn(2).print();
 
  365 template <
typename S>
 
  368   return IMatrix3<S>(v_[0].getBound(), v_[1].getBound(), v_[2].getBound());
 
  372 template <
typename S>
 
  375   return IMatrix3<S>(v_[0].getBound(l, 
r), v_[1].getBound(l, 
r), v_[2].getBound(l, 
r));
 
  379 template <
typename S>
 
  382   return IMatrix3<S>(v_[0].getBound(t), v_[1].getBound(t), v_[2].getBound(t));
 
  386 template <
typename S>
 
  389   return IMatrix3<S>(v_[0].getTightBound(), v_[1].getTightBound(), v_[2].getTightBound());
 
  393 template <
typename S>
 
  396   return IMatrix3<S>(v_[0].getTightBound(l, 
r), v_[1].getTightBound(l, 
r), v_[2].getTightBound(l, 
r));
 
  400 template <
typename S>
 
  405   S tmp = v_[0][0].remainder().diameter();
 
  407   tmp = v_[0][1].remainder().diameter();
 
  409   tmp = v_[0][2].remainder().diameter();
 
  412   tmp = v_[1][0].remainder().diameter();
 
  414   tmp = v_[1][1].remainder().diameter();
 
  416   tmp = v_[1][2].remainder().diameter();
 
  419   tmp = v_[2][0].remainder().diameter();
 
  421   tmp = v_[2][1].remainder().diameter();
 
  423   tmp = v_[2][2].remainder().diameter();
 
  430 template <
typename S>
 
  433   v_[0].setTimeInterval(time_interval);
 
  434   v_[1].setTimeInterval(time_interval);
 
  435   v_[2].setTimeInterval(time_interval);
 
  439 template <
typename S>
 
  442   v_[0].setTimeInterval(l, 
r);
 
  443   v_[1].setTimeInterval(l, 
r);
 
  444   v_[2].setTimeInterval(l, 
r);
 
  448 template <
typename S>
 
  451   return v_[0].getTimeInterval();
 
  455 template <
typename S>
 
  458   for(std::size_t i = 0; i < 3; ++i)
 
  460     for(std::size_t j = 0; j < 3; ++j)
 
  462       if(v_[i][j].remainder()[0] < -1) v_[i][j].remainder()[0] = -1;
 
  463       else if(v_[i][j].remainder()[0] > 1) v_[i][j].remainder()[0] = 1;
 
  465       if(v_[i][j].remainder()[1] < -1) v_[i][j].remainder()[1] = -1;
 
  466       else if(v_[i][j].remainder()[1] > 1) v_[i][j].remainder()[1] = 1;
 
  468       if((v_[i][j].remainder()[0] == -1) && (v_[i][j].remainder()[1] == 1))
 
  470         v_[i][j].coeff(0) = 0;
 
  471         v_[i][j].coeff(1) = 0;
 
  472         v_[i][j].coeff(2) = 0;
 
  473         v_[i][j].coeff(3) = 0;
 
  482 template <
typename S>
 
  487   for(std::size_t i = 0; i < 3; ++i)
 
  489     for(std::size_t j = 0; j < 3; ++j)
 
  491       if(m(i, j).remainder()[0] < -1) res(i, j).remainder()[0] = -1;
 
  492       else if(m(i, j).remainder()[0] > 1) res(i, j).remainder()[0] = 1;
 
  494       if(m(i, j).remainder()[1] < -1) res(i, j).remainder()[1] = -1;
 
  495       else if(m(i, j).remainder()[1] > 1) res(i, j).remainder()[1] = 1;
 
  497       if((m(i, j).remainder()[0] == -1) && (m(i, j).remainder()[1] == 1))
 
  499         res(i, j).coeff(0) = 0;
 
  500         res(i, j).coeff(1) = 0;
 
  501         res(i, j).coeff(2) = 0;
 
  502         res(i, j).coeff(3) = 0;
 
  511 template <
typename S>
 
  515   res(0, 0) = a * m(0, 0);
 
  516   res(0, 1) = a * m(0, 1);
 
  517   res(0, 1) = a * m(0, 2);
 
  519   res(1, 0) = a * m(1, 0);
 
  520   res(1, 1) = a * m(1, 1);
 
  521   res(1, 1) = a * m(1, 2);
 
  523   res(2, 0) = a * m(2, 0);
 
  524   res(2, 1) = a * m(2, 1);
 
  525   res(2, 1) = a * m(2, 2);
 
  531 template <
typename S>
 
  538 template <
typename S>
 
  545 template <
typename S>
 
  552 template <
typename S>
 
  559 template <
typename S>