pub struct GridCone {
pub pos: IVec2,
pub angle_dir_rad: f32,
pub angle_arc_rad: f32,
pub range: usize,
}
Expand description
A cone/triangle of points on a 2d grid.
Fields§
§pos: IVec2
§angle_dir_rad: f32
Angle of the cone in radians
angle_arc_rad: f32
Arc of the cone in radians
range: usize
Implementations§
Source§impl GridCone
impl GridCone
Sourcepub fn new(xy: impl GridPoint, dir_deg: f32, arc_deg: f32, range: usize) -> Self
pub fn new(xy: impl GridPoint, dir_deg: f32, arc_deg: f32, range: usize) -> Self
Create a new GridCone from angles represented in degrees.
Note an angle of 0.
points to the right, and an angle of 90.
points
straight up (angle increases counter-clockwise).
Trait Implementations§
Source§impl IntoIterator for GridCone
impl IntoIterator for GridCone
impl Copy for GridCone
impl StructuralPartialEq for GridCone
Auto Trait Implementations§
impl Freeze for GridCone
impl RefUnwindSafe for GridCone
impl Send for GridCone
impl Sync for GridCone
impl Unpin for GridCone
impl UnwindSafe for GridCone
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more