I'm trying to adapt ImGuizmo with Qt. It seems that ImGuizmo's manipulation interaction works fine; the rotation axis moves well, but my model is not changing.
if (mSelectedItem) {
glm::mat4 projectionMatrix = mCamera->GetProjectionMatrix();
glm::mat4& modelMatrix = mSelectedItem->GetModelMatrix(); // Replace with your model matrix
// Set ImGuizmo operation (TRANSLATE, ROTATE, SCALE)
ImGuizmo::OPERATION operation = ImGuizmo::ROTATE;
// Set ImGuizmo mode (LOCAL, WORLD)
ImGuizmo::MODE mode = ImGuizmo::LOCAL;
// Render ImGuizmo gizmo
ImGuizmo::Manipulate(
glm::value_ptr(viewMatrix),
glm::value_ptr(projectionMatrix),
operation,
mode,
glm::value_ptr(modelMatrix)
);
}
I'm attempting to edit the model, but the axis is consistently drawn in the middle of my grid, and the model doesn't seem to change.
I'm trying to adapt ImGuizmo with Qt. It seems that ImGuizmo's manipulation interaction works fine; the rotation axis moves well, but my model is not changing.
if (mSelectedItem) {
}
I'm attempting to edit the model, but the axis is consistently drawn in the middle of my grid, and the model doesn't seem to change.
I'm using this as an 'adapter' to Qt: https://github.com/seanchas116/qtimgui/blob/master/examples/widget/demo-widget.cpp. Also, the issue is occurring with the manipulate view. Any help is appreciated to adapt this to my Qt project.