URL: https://graphicscomputing.fr/cgp/reference/affine_rts/
Description: Similarity transform: rotation + translation + uniform scaling.

# affine_rts

Similarity transform: rotation + translation + uniform scaling.

Fields:

- `rotation_transform rotation` - Rotation part of the similarity transform.
- `vec3 translation` - Translation part of the similarity transform, applied after the scaling and the rotation.
- `float scaling` - Uniform scaling factor, applied before the rotation (default 1).

Functions taking it:

- `affine_rts inverse(affine_rts const& T)` - Inverse affine transform.
- `std::string type_str(affine_rts const&)` - Type name "affine_rts".
- `std::string str(affine_rts const& T)` - String listing the rotation (quaternion), translation and scaling of the transform.

Operators:

- `affine operator*(affine_rts const& T1, affine const& T2)` - Composition T1 o T2 of a rotation-translation-scaling (parent) with an affine transform (child), exact for any scaling_xyz.
- `affine operator*(affine const& T1, affine_rts const& T2)` - Composition T1 o T2 of an affine transform with a rotation-translation-scaling, returned as an affine; asserts that T1.scaling_xyz is uniform (use T1.matrix()*T2.matrix() otherwise).
- `vec3 operator*(affine_rts const& T, vec3 const& p)` - Apply the transform to a point: scaling * (rotation * p) + translation.
- `vec4 operator*(affine_rts const& T, vec4 const& p)` - Apply the transform to a homogeneous vector, the translation being weighted by w.
- `affine_rts operator*(affine_rts const& T1, affine_rts const& T2)` - Composition T1 o T2 of two rotation-translation-scaling transforms.
- `affine_rts operator*(affine_rts const& T, rotation_transform const& R)` - Transform T o R: the rotation is applied before T.
- `affine_rts operator*(rotation_transform const& R, affine_rts const& T)` - Transform R o T: the rotation is applied after T, rotating its translation as well.
- `affine_rts operator+(vec3 const& tr, affine_rts const& T)` - Copy of the transform with tr added to its translation.
- `affine_rts operator+(affine_rts const& T, vec3 const& tr)` - Copy of the transform with tr added to its translation.
- `affine_rts operator-(affine_rts const& T, vec3 const& tr)` - Copy of the transform with tr subtracted from its translation.
- `affine_rts operator*(float s, affine_rts const& T)` - Copy of the transform with its scaling multiplied by s, the translation being left unchanged.
- `affine_rts operator*(affine_rts const& T, float s)` - Copy of the transform with its scaling multiplied by s, the translation being left unchanged.
- `affine_rts operator/(affine_rts const& T, float s)` - Copy of the transform with its scaling divided by s, the translation being left unchanged.
- `affine_rts operator*(float s, rotation_transform const& r)` - Rotation-translation-scaling transform made of the rotation r scaled by s, with zero translation.
- `affine_rts operator*(rotation_transform const& r, float s)` - Rotation-translation-scaling transform made of the rotation r scaled by s, with zero translation.
- `affine_rts operator*(float s, affine_rt const& T)` - Uniform scaling by s applied after the rigid transform (rotation kept, translation and scaling multiplied by s).
- `affine_rts operator*(affine_rt const& T, float s)` - Uniform scaling by s applied after the rigid transform (rotation kept, translation and scaling multiplied by s).
- `affine_rts operator*(affine_rts const& T1, affine_rt const& T2)` - Composition T1 o T2 of a rotation-translation-scaling with a rigid transform.
- `affine_rts operator*(affine_rt const& T1, affine_rts const& T2)` - Composition T1 o T2 of a rigid transform with a rotation-translation-scaling.
- `mat4 operator*(affine_rts const& T1, mat4 const& T2)` - Product of the 4x4 matrix of the transform with a mat4.
- `mat4 operator*(mat4 const& T1, affine_rts const& T2)` - Product of a mat4 with the 4x4 matrix of the transform.
- `mat4 operator*(affine_rts const& T1, mat3 const& T2)` - Product of the 4x4 matrix of the transform with a mat3 extended to a mat4.
- `mat4 operator*(mat3 const& T1, affine_rts const& T2)` - Product of a mat3 extended to a mat4 with the 4x4 matrix of the transform.
- `std::ostream& operator<<(std::ostream& s, affine_rts const& T)` - Write str(T) of the transform to the stream.
