خرید بک لینک

Vote count: 0

At the moment, I convert the vec3 to vec4, multiply it with the matrix, and then cast it back to vec3

Code:

glm::vec3 transformed = glm::vec3(matrix * glm::vec4(point, 0.0))

It works, but I think it is not the good way to calculate it. Is it possible to apply a mat4 on a vec3, without casting it to vec4 and back?

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 13 فروردين 1395 ساعت: 21:28

صفحه بندی