25 #ifndef LSST_AFW_MATH_AFFINE_TRANSFORM_H
26 #define LSST_AFW_MATH_AFFINE_TRANSFORM_H
90 : _linear(matrix.block<2, 2>(0, 0)), _translation(matrix.block<2, 1>(0, 2)) {}
93 explicit AffineTransform(Eigen::Matrix2d
const &linear) : _linear(linear), _translation() {}
96 explicit AffineTransform(Eigen::Vector2d
const &translation) : _linear(), _translation(translation) {}
99 explicit AffineTransform(Eigen::Matrix2d
const &linear, Eigen::Vector2d
const &translation)
100 : _linear(linear), _translation(translation) {}
110 : _linear(linear), _translation(translation) {}
160 double &
operator[](
int i) {
return (i < 4) ? _linear[i] : _translation[i - 4]; }
161 double operator[](
int i)
const {
return (i < 4) ? _linear[i] : _translation[i - 4]; }
172 _linear = other._linear;
173 _translation = other._translation;
178 _linear += other._linear;
179 _translation += other._translation;
190 _linear -= other._linear;
191 _translation -= other._translation;
284 #endif // !LSST_AFW_MATH_AFFINE_TRANSFORM_H
Extent< double, 2 > Extent2D
std::ostream & operator<<(std::ostream &os, lsst::afw::geom::AffineTransform const &transform)
A class representing an angle.
Point< double, 2 > Point2D
AffineTransform makeAffineTransformFromTriple(Point2D const &p1, Point2D const &p2, Point2D const &p3, Point2D const &q1, Point2D const &q2, Point2D const &q3)