Struct sark_grids::geometry::GridCone
source · pub struct GridCone {
pub pos: IVec2,
pub angle_dir_rad: f32,
pub angle_size_rad: f32,
pub range: usize,
}
Fields§
§pos: IVec2
§angle_dir_rad: f32
Angle of the cone in radians
angle_size_rad: f32
Size/Arc of the cone in radians
range: usize
Implementations§
source§impl GridCone
impl GridCone
sourcepub fn new(
xy: impl GridPoint,
dir_deg: f32,
size_deg: f32,
range: usize
) -> Self
pub fn new( xy: impl GridPoint, dir_deg: f32, size_deg: f32, range: usize ) -> Self
Create a new grid 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
source§impl PartialEq<GridCone> for GridCone
impl PartialEq<GridCone> for GridCone
impl Copy for GridCone
impl StructuralPartialEq for GridCone
Auto Trait Implementations§
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