23 #ifndef LSST_AFW_GEOM_LINEAR_TRANSFORM_H 24 #define LSST_AFW_GEOM_LINEAR_TRANSFORM_H 27 #include "Eigen/Geometry" 79 typedef Eigen::Matrix<double, 2, 2, Eigen::DontAlign>
Matrix;
87 LinearTransform(LinearTransform
const&) =
default;
88 LinearTransform(LinearTransform&&) =
default;
89 ~LinearTransform() =
default;
91 LinearTransform
operator*(LinearTransform
const& other)
const {
92 return LinearTransform(getMatrix() * other.
getMatrix());
96 return LinearTransform((Matrix() << s, 0.0, 0.0, s).finished());
100 return LinearTransform((Matrix() << s, 0.0, 0.0, t).finished());
104 return LinearTransform(Matrix(Eigen::Rotation2D<double>(t.
asRadians())));
107 LinearTransform& operator=(LinearTransform
const&) =
default;
108 LinearTransform& operator=(LinearTransform&&) =
default;
111 _matrix += other._matrix;
115 LinearTransform
operator+(LinearTransform
const& other) {
116 LinearTransform tmp(*
this);
122 _matrix -= other._matrix;
126 LinearTransform
operator-(LinearTransform
const& other) {
127 LinearTransform tmp(*
this);
137 ParameterVector
const getParameterVector()
const;
143 void setParameterVector(ParameterVector
const& vector);
149 double const&
operator[](
int i)
const {
return const_cast<Matrix&
>(_matrix)(i % 2, i / 2); }
156 LinearTransform
const invert()
const;
161 double computeDeterminant()
const;
185 TransformDerivativeMatrix dTransform(
Point2D const& input)
const;
199 #endif // !LSST_AFW_GEOM_LINEAR_TRANSFORM_H
Extent< double, 2 > Extent2D
std::ostream & operator<<(std::ostream &os, lsst::afw::geom::AffineTransform const &transform)
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
A class representing an angle.
A base class for image defects.
Point< double, 2 > Point2D
constexpr double asRadians() const noexcept
Return an Angle's value in radians.
#define LSST_EXCEPTION_TYPE(t, b, c)