ghx_grid 0.8.0

2D & 3D grid structures & utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::direction::DirectionTrait;

/// Represents a coordinate system
pub trait CoordinateSystem: Default + Clone + Sync + Send + 'static {
    /// [DirectionTrait] type used in this system
    type Direction: DirectionTrait;

    /// Returns the [`DirectionTrait`] used in this coordinate system
    fn directions(&self) -> &'static [Self::Direction];

    /// Returns the total count of directions
    fn directions_count(&self) -> usize;
}