Skip to content

Commit

Permalink
physics minor fix, logarithmic slider for focus-distance
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Dec 5, 2024
1 parent f978a65 commit e32d6cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/imgui/imgui_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ void draw_camera_param_ui(vierkant::physical_camera_params_t &camera_params)

// focal distance (dof)
ImGui::SliderFloat("focal distance (m)", &camera_params.focal_distance, camera_params.clipping_distances.x,
camera_params.clipping_distances.y);
camera_params.clipping_distances.y, "%.2f", ImGuiSliderFlags_Logarithmic);

// f-stop/aperture
constexpr float f_stop_min = 0.1f, f_stop_max = 128.f;
Expand Down
2 changes: 1 addition & 1 deletion src/physics_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ void PhysicsScene::remove_object(const Object3DPtr &object)

// grow aabb by a factor, wake up other objects there
constexpr float aabb_grow_factor = 1.2f;
m_context.body_interface().activate_in_aabb(object->aabb() * aabb_grow_factor);
m_context.body_interface().activate_in_aabb(object->aabb().transform(object->transform) * aabb_grow_factor);
}
vierkant::Scene::remove_object(object);
}
Expand Down

0 comments on commit e32d6cc

Please sign in to comment.