I need matrix 3D transformation, model transformation i.e scale-rotate-translate and then that model into world space so model-projection-view matrices.

I need it with GLM specified simd vectors and matrices according to their old version. But I can only find transformation functions without simd vectors or matrix in examples like this

#include <glm/vec3.hpp> // glm::vec3
#include <glm/vec4.hpp> // glm::vec4
#include <glm/mat4x4.hpp> // glm::mat4
#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective
glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
glm::mat4 Projection = glm::perspective(glm::radians(45.0f), 4.0f / 3.0f, 0.1f, 100.f);
glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
return Projection * View * Model;

I need it something like this

 glm::detail::fmat4x4SIMD MatrixMultiply()
        glm::detail::fmat4x4SIMD m(1.0f);
        glm::detail::fmat4x4SIMD m1(1.0f);
        m1 = m1 * m;
        return m1;

But If I try to give glm::lookAt, glm::rotate with fvec4SIMD/fvec4x4SIMD it gives me error that these built in functions does not support simd.

Any idea how to do this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.