mirror of https://github.com/CGAL/cgal
Add Aff_transformation_2 conversion, simplify Aff_tr_3's
This commit is contained in:
parent
edb664d85a
commit
5aa34c9106
|
|
@ -396,24 +396,25 @@ public:
|
||||||
return std::make_pair(operator()(pp.first), operator()(pp.second));
|
return std::make_pair(operator()(pp.first), operator()(pp.second));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typename K2::Aff_transformation_2
|
||||||
|
operator()(const typename K1::Aff_transformation_2& a) const
|
||||||
|
{
|
||||||
|
typedef typename K2::Aff_transformation_2 Aff_transformation_2;
|
||||||
|
return Aff_transformation_2(c(a.m(0,0)), c(a.m(0,1)), c(a.m(0,2)),
|
||||||
|
c(a.m(1,0)), c(a.m(1,1)), c(a.m(1,2)),
|
||||||
|
c(a.m(2,2)));
|
||||||
|
}
|
||||||
|
|
||||||
typename K2::Aff_transformation_3
|
typename K2::Aff_transformation_3
|
||||||
operator()(const typename K1::Aff_transformation_3& a) const
|
operator()(const typename K1::Aff_transformation_3& a) const
|
||||||
{
|
{
|
||||||
typedef typename K2::Aff_transformation_3 Aff_transformation_3;
|
typedef typename K2::Aff_transformation_3 Aff_transformation_3;
|
||||||
typename K2::FT t[12];
|
return Aff_transformation_3(c(a.m(0,0)), c(a.m(0,1)), c(a.m(0,2)), c(a.m(0,3)),
|
||||||
for(int i=0; i< 3; ++i)
|
c(a.m(1,0)), c(a.m(1,1)), c(a.m(1,2)), c(a.m(1,3)),
|
||||||
{
|
c(a.m(2,0)), c(a.m(2,1)), c(a.m(2,2)), c(a.m(2,3)),
|
||||||
for(int j=0; j<4; ++j)
|
c(a.m(3,3)));
|
||||||
{
|
|
||||||
t[i*4+j] = a.m(i,j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Aff_transformation_3(
|
|
||||||
t[0],t[1],t[2],t[3],
|
|
||||||
t[4],t[5],t[6],t[7],
|
|
||||||
t[8],t[9],t[10],t[11],
|
|
||||||
a.m(3,3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Converter c;
|
Converter c;
|
||||||
K2 k;
|
K2 k;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue