Class transform2d_t#

Inheritance Relationships#

Base Type#

Class Documentation#

class transform2d_t : public f3d::double_array_t<9>#

Store a 3x3 transform matrix as a sequence of 9 float values VTK expects a 4x4 matrix, but for 2d transforms this is exposed as a 3x3 matrix

Public Functions

inline transform2d_t() = default#
inline explicit transform2d_t(const std::vector<double> &vec)#
inline transform2d_t(const std::initializer_list<double> &list)#
inline transform2d_t(double M1_1, double M1_2, double M1_3, double M2_1, double M2_2, double M2_3, double M3_1, double M3_2, double M3_3)#

The variables of this function are based on the mathematical notation for matrices, where the coordinates correspond to the following:

  [M1_1, M1_2, M1_3]
M = [M2_1, M2_2, M2_3] [M3_1, M3_2, M3_3]

F3D_EXPORT transform2d_t(const double_array_t<2> &scale, const double_array_t<2> &translate, const angle_deg_t &angleRad)#

The general form of a 3x3 transformation matrix M with scale S(x,y), translation T(x,y), and angle a (in degrees), is solved out to the following:

[cos(a)*S(x), -sin(a)*S(y),   T(x)]
M = [sin(a)*S(x), cos(a)*S(y), T(y)] [0, 0, 1 ]

Using this formula, we fill each cell using the values in the constructor