pub enum Octant {
NorthOfEast,
EastOfNorth,
WestOfNorth,
NorthOfWest,
SouthOfWest,
WestOfSouth,
EastOfSouth,
SouthOfEast,
}Expand description
4\33333|22222/1 44\3333|2222/11 444\333|222/111 4444\33|22/1111 44444\3|2/11111 ——@_@—— 55555/6|7\88888 5555/66|77\8888 555/666|777\888 55/6666|7777\88 5/66666|77777\8
Variants§
Implementations§
Source§impl Octant
impl Octant
Sourcepub fn grid_point_on_scan_line(
&self,
observer: IVec2,
depth: i32,
slope: f32,
) -> IVec2
pub fn grid_point_on_scan_line( &self, observer: IVec2, depth: i32, slope: f32, ) -> IVec2
Get the grid point on scan line per quadrant
pub fn get_adjusted_pivot(&self, pivot: Pivot) -> Pivot
Sourcepub fn slope_abs(
&self,
world_dimensions: &WorldDimensions,
observer: &IVec2,
tile: &IVec2,
pivot: Pivot,
) -> f32
pub fn slope_abs( &self, world_dimensions: &WorldDimensions, observer: &IVec2, tile: &IVec2, pivot: Pivot, ) -> f32
Returns the absolute slope for an octant Octants (1, 4, 5, 8) and (2, 3, 6, 7) should have the same absolute slope
pub fn get_next_tile_on_scanline(&self, tile: &IVec2) -> IVec2
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Octant
impl RefUnwindSafe for Octant
impl Send for Octant
impl Sync for Octant
impl Unpin for Octant
impl UnwindSafe for Octant
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