INNER CODE UNIT · C++

transform_mat

oxylusengine/Oxylus · ResourceCompiler/private/ModelCompiler.cpp:654

      auto transform_mat = glm::make_mat4x4(mat->data());
      auto skew = glm::vec3{};
      auto perspective = glm::vec4{};
      glm::decompose(transform_mat, scale, rotation, translation, skew, perspective);
    }

    mesh_group.translation[0] = translation.x;
    mesh_group.translation[1] = translation.y;
    mesh_group.translation[2] = translation.z;
    mesh_group.rotation[0] = rotation.x;
    mesh_group.rotation[1] = rotation.y;
    mesh_group.rotation[2] = rotation.z;
    mesh_group.rotation[3] = rotation.w;
    mesh_group.scale[0] = scale.x;
    mesh_group.scale[1] = scale.y;
    mesh_group.scale[2] = scale.z;

    if (node.lightIndex.has_value()) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…