pub struct ExtendedDiamond {
pub inner: [(i32, i32); 4],
pub middle: [(i32, i32); 8],
pub outer: [(i32, i32); 4],
}Expand description
Extended Diamond Search Pattern.
A 16-point pattern for larger steps:
*
* * *
* * * * *
* * * O * * *
* * * * *
* * *
*Fields§
§inner: [(i32, i32); 4]Inner ring (4 points, distance 1).
middle: [(i32, i32); 8]Middle ring (8 points, distance 2).
outer: [(i32, i32); 4]Outer ring (4 points, distance 3).
Implementations§
Source§impl ExtendedDiamond
impl ExtendedDiamond
Sourcepub fn search(
&self,
ctx: &SearchContext<'_>,
config: &SearchConfig,
center: MotionVector,
) -> (MotionVector, u32)
pub fn search( &self, ctx: &SearchContext<'_>, config: &SearchConfig, center: MotionVector, ) -> (MotionVector, u32)
Searches using all rings of the extended diamond.
Trait Implementations§
Source§impl Clone for ExtendedDiamond
impl Clone for ExtendedDiamond
Source§fn clone(&self) -> ExtendedDiamond
fn clone(&self) -> ExtendedDiamond
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtendedDiamond
impl Debug for ExtendedDiamond
Source§impl Default for ExtendedDiamond
impl Default for ExtendedDiamond
impl Copy for ExtendedDiamond
Auto Trait Implementations§
impl Freeze for ExtendedDiamond
impl RefUnwindSafe for ExtendedDiamond
impl Send for ExtendedDiamond
impl Sync for ExtendedDiamond
impl Unpin for ExtendedDiamond
impl UnsafeUnpin for ExtendedDiamond
impl UnwindSafe for ExtendedDiamond
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more