mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 02:18:28 +00:00
Simplify function parameter
This commit is contained in:
parent
2d23e9f65f
commit
2bb2899bcc
@ -1,7 +1,7 @@
|
||||
//! Viewer camera module
|
||||
use std::f64::consts::FRAC_PI_2;
|
||||
|
||||
use fj_interop::{Mesh, Model};
|
||||
use fj_interop::Mesh;
|
||||
use fj_math::{Aabb, Point, Scalar, Transform, Vector};
|
||||
|
||||
use crate::screen::NormalizedScreenPosition;
|
||||
@ -82,10 +82,10 @@ impl Camera {
|
||||
pub fn focus_point(
|
||||
&self,
|
||||
cursor: Option<NormalizedScreenPosition>,
|
||||
model: &Model,
|
||||
mesh: &Mesh,
|
||||
aabb: &Aabb<3>,
|
||||
) -> FocusPoint {
|
||||
self.calculate_focus_point(cursor, &model.mesh)
|
||||
self.calculate_focus_point(cursor, mesh)
|
||||
.unwrap_or_else(|| FocusPoint(aabb.center()))
|
||||
}
|
||||
|
||||
|
@ -144,8 +144,11 @@ impl Viewer {
|
||||
pub fn add_focus_point(&mut self) {
|
||||
if let Some((model, aabb)) = &self.model {
|
||||
if self.focus_point.is_none() {
|
||||
self.focus_point =
|
||||
Some(self.camera.focus_point(self.cursor, model, aabb));
|
||||
self.focus_point = Some(self.camera.focus_point(
|
||||
self.cursor,
|
||||
&model.mesh,
|
||||
aabb,
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user