Skip to content

Commit

Permalink
Fix cargo format
Browse files Browse the repository at this point in the history
  • Loading branch information
lbirkert committed Aug 13, 2023
1 parent 5010dab commit 128cf57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions crates/kelocam-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod axis;
pub mod geometry;
pub mod line;
pub mod mesh;
pub mod path;
Expand All @@ -7,9 +8,10 @@ pub mod ray;
pub mod sphere;
pub mod square;
pub mod triangle;
pub mod geometry;

pub use axis::Axis;
pub use geometry::BoundingBox;
pub use geometry::Geometry;
pub use line::Line;
pub use mesh::Mesh;
pub use path::Path3;
Expand All @@ -18,5 +20,3 @@ pub use ray::Ray;
pub use sphere::Sphere;
pub use square::Square;
pub use triangle::Triangle;
pub use geometry::Geometry;
pub use geometry::BoundingBox;
12 changes: 7 additions & 5 deletions crates/kelocam-editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ pub mod camera;
pub mod icons;
pub mod log;
pub mod object;
pub mod renderer;
pub mod state;
pub mod tool;
pub mod renderer;

pub use camera::Camera;
pub use icons::Icons;
use kelocam_core::{BoundingBox, Plane};
pub use log::Log;
pub use log::Message;
pub use state::State;
pub use tool::Action;
pub use tool::Tool;
use kelocam_core::{BoundingBox, Plane};

#[derive(Default)]
pub struct Editor {
Expand Down Expand Up @@ -85,7 +85,10 @@ impl Editor {
pub fn move_delta(&self, plane: &Plane, before: Vec2, after: Vec2) -> Option<Vector3<f32>> {
Some(
self.camera.screen_ray(after.x, after.y).intersect(plane)?
- self.camera.screen_ray(before.x, before.y).intersect(plane)?,
- self
.camera
.screen_ray(before.x, before.y)
.intersect(plane)?,
)
}

Expand Down Expand Up @@ -219,7 +222,7 @@ impl Editor {
mesh.translate(&-selection_origin);
self.state.tool.apply(&mut mesh);
// Snap to plate
let min = mesh.bb_min();
let min = mesh.bb_min();
mesh.translate(
&(selection_origin
+ Vector3::new(0.0, 0.0, -min.z - selection_origin.z)),
Expand Down Expand Up @@ -458,4 +461,3 @@ impl Renderer {
}
}
}

0 comments on commit 128cf57

Please sign in to comment.