Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Apr 17, 2022
1 parent 49a0cd0 commit 6d93e6e
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,7 @@ pub mod rays {
use bevy::{
math::Vec3A,
prelude::*,
render::{
camera::{Camera, RenderTarget},
primitives::Aabb,
},
render::{camera::Camera, primitives::Aabb},
};

/// A 3D ray, with an origin and direction. The direction is guaranteed to be normalized.
Expand Down Expand Up @@ -188,25 +185,6 @@ pub mod rays {
Some([hit_near, hit_far])
}
}

fn get_window_for_camera<'a>(windows: &'a Windows, camera: &Camera) -> Option<&'a Window> {
match camera.target {
RenderTarget::Window(window_id) => match windows.get(window_id) {
None => {
error!("WindowId {} does not exist", window_id);
None
}
window => window,
},
_ => {
error!(
"Only window render targets are supported, got {:?}",
camera.target
);
None
}
}
}
}

#[derive(Debug, PartialEq, Copy, Clone)]
Expand Down

0 comments on commit 6d93e6e

Please sign in to comment.