+ ImGui::SameLine();
+ if(ImGui::Button("xform")) {
+ ImGui::OpenPopup("xform_popup");
+ }
+ if(ImGui::BeginPopup("xform_popup")) {
+ ImGui::Text("Local transform");
+ Vec3 p = get_node_position();
+ ImGui::BulletText("P: %g %g %g", p.x, p.y, p.z);
+ Quat q = get_node_rotation();
+ ImGui::BulletText("R: %g %g %g %g", q.x, q.y, q.z, q.w);
+ Vec3 s = get_node_scaling();
+ ImGui::BulletText("S: %g %g %g", s.x, s.y, s.z);
+
+ ImGui::Separator();
+ ImGui::Text("Global transform");
+ p = get_position();
+ ImGui::BulletText("P: %g %g %g", p.x, p.y, p.z);
+ q = get_rotation();
+ ImGui::BulletText("R: %g %g %g %g", q.x, q.y, q.z, q.w);
+ s = get_scaling();
+ ImGui::BulletText("S: %g %g %g", s.x, s.y, s.z);
+
+ const Mat4 &mat = get_matrix();
+ ImGui::BulletText("| %3.3f %3.3f %3.3f %3.3f |", mat[0][0], mat[0][1], mat[0][2], mat[0][3]);
+ ImGui::BulletText("| %3.3f %3.3f %3.3f %3.3f |", mat[1][0], mat[1][1], mat[1][2], mat[1][3]);
+ ImGui::BulletText("| %3.3f %3.3f %3.3f %3.3f |", mat[2][0], mat[2][1], mat[2][2], mat[2][3]);
+ ImGui::BulletText("| %3.3f %3.3f %3.3f %3.3f |", mat[3][0], mat[3][1], mat[3][2], mat[3][3]);
+
+ ImGui::EndPopup();
+ }