Trait surface_grid::GridPoint
source · pub trait GridPoint: Eq + PartialEq + Clone {
// Required methods
fn up(&self) -> Self;
fn down(&self) -> Self;
fn left(&self) -> Self;
fn right(&self) -> Self;
fn position(&self, scale: f64) -> (f64, f64, f64);
}
Expand description
A point on a surface grid.
A type implementing this trait should ensure that the following conditions are met:
- Two points are equal if they point to the same physical location on the grid.
A point on the grid must also be associated with some direction. For surfaces that loop this should work such that moving in the same direction will eventually result in reaching the point at which you started moving.
Required Methods§
Object Safety§
This trait is not object safe.