22 #ifndef LSST_GEOM_LINEAR_TRANSFORM_H 23 #define LSST_GEOM_LINEAR_TRANSFORM_H 26 #include "Eigen/Geometry" 77 typedef Eigen::Matrix<double, 2, 2, Eigen::DontAlign>
Matrix;
85 LinearTransform(LinearTransform
const&) =
default;
86 LinearTransform(LinearTransform&&) =
default;
87 ~LinearTransform() =
default;
89 LinearTransform
operator*(LinearTransform
const& other)
const {
90 return LinearTransform(getMatrix() * other.
getMatrix());
94 return LinearTransform((Matrix() << s, 0.0, 0.0, s).finished());
98 return LinearTransform((Matrix() << s, 0.0, 0.0, t).finished());
102 return LinearTransform(Matrix(Eigen::Rotation2D<double>(t.
asRadians())));
105 LinearTransform& operator=(LinearTransform
const&) =
default;
106 LinearTransform& operator=(LinearTransform&&) =
default;
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_GEOM_LINEAR_TRANSFORM_H
constexpr double asRadians() const noexcept
Return an Angle's value in radians.
Relationship invert(Relationship r)
A class representing an angle.
Point< double, 2 > Point2D
std::ostream & operator<<(std::ostream &os, lsst::geom::AffineTransform const &transform)
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
Extent< double, 2 > Extent2D
#define LSST_EXCEPTION_TYPE(t, b, c)