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
operator*(LinearTransform
const& other)
const {
88 return LinearTransform(getMatrix() * other.
getMatrix());
92 return LinearTransform((Matrix() << s, 0.0, 0.0, s).finished());
96 return LinearTransform((Matrix() << s, 0.0, 0.0, t).finished());
100 return LinearTransform(Matrix(Eigen::Rotation2D<double>(t.
asRadians())));
103 LinearTransform&
operator=(LinearTransform
const& other) {
104 _matrix = other._matrix;
109 _matrix += other._matrix;
113 LinearTransform
operator+(LinearTransform
const& other) {
114 LinearTransform tmp(*
this);
120 _matrix -= other._matrix;
124 LinearTransform
operator-(LinearTransform
const& other) {
125 LinearTransform tmp(*
this);
135 ParameterVector
const getParameterVector()
const;
141 void setParameterVector(ParameterVector
const& vector);
147 double const&
operator[](
int i)
const {
return const_cast<Matrix&
>(_matrix)(i % 2, i / 2); }
154 LinearTransform
const invert()
const;
159 double computeDeterminant()
const;
183 TransformDerivativeMatrix dTransform(
Point2D const& input)
const;
197 #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)