[][src]Trait neurarbor::Location

pub trait Location {
    fn location(&self) -> &[Precision; 3];

    fn distance_to(&self, other: &[Precision; 3]) -> Precision { ... }
fn project_towards(
        &self,
        other: &[Precision; 3],
        distance: Precision
    ) -> ([Precision; 3], Precision) { ... } }

Required methods

fn location(&self) -> &[Precision; 3]

Where the point is, in 3D space

Loading content...

Provided methods

fn distance_to(&self, other: &[Precision; 3]) -> Precision

How far from one Location object to another

fn project_towards(
    &self,
    other: &[Precision; 3],
    distance: Precision
) -> ([Precision; 3], Precision)

Where you would end up if you travelled distance towards other, and the overshoot: how far past the point you have travelled (negative if the point was not reached).

Loading content...

Implementations on Foreign Types

impl Location for [Precision; 3][src]

impl<'_> Location for &'_ [Precision; 3][src]

impl<T, L: Location> Location for (T, L)[src]

impl<'_, T, L: Location> Location for &'_ (T, L)[src]

Loading content...

Implementors

Loading content...