5.3.4.113. Function motion_update_pos

5.3.4.113.1. Function Documentation

hcoord_t motion_update_pos(const tmat3x3_t *tmat, const float x, const float y)

Considering a position \(q1\), computes the new position \(q2\) after applying a tmat3x3_t transformation matrix. This implementation is optimized for rigid transformations only.

\[\begin{split} T_{3 \times3 } ~~ . ~ \begin{bmatrix} q1_x \\ q1_y \\ 1 \end{bmatrix} = \begin{bmatrix} q2_x \\ q2_y \\ 1 \end{bmatrix}. \end{split}\]

Parameters
  • tmat – An allocated and initialized tmat3x3_t transformation matrix.

  • x – Abscissa component of the initial position \(q1\).

  • y – Ordinate component of the initial position \(q1\).

Returns

The new position \(q2\) after the transformation (returned as hcoord_t homogeneous coordinates).