| 278 | } |
| 279 | |
| 280 | void olc::GFX2D::Transform2D::Backward(float in_x, float in_y, float &out_x, float &out_y) |
| 281 | { |
| 282 | out_x = in_x * matrix[3][0][0] + in_y * matrix[3][1][0] + matrix[3][2][0]; |
| 283 | out_y = in_x * matrix[3][0][1] + in_y * matrix[3][1][1] + matrix[3][2][1]; |
| 284 | float out_z = in_x * matrix[3][0][2] + in_y * matrix[3][1][2] + matrix[3][2][2]; |
| 285 | if (out_z != 0) |
| 286 | { |
| 287 | out_x /= out_z; |
| 288 | out_y /= out_z; |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | void olc::GFX2D::Transform2D::Invert() |
| 293 | { |