[][src]Struct line_drawing::Bresenham3d

pub struct Bresenham3d<T> { /* fields omitted */ }

An 3-D implementation of bresenham, sourced from this site.

It includes both the start and end point and is asymmetrical.

Example:

extern crate line_drawing;
use line_drawing::Bresenham3d;

fn main() {
    for (x, y, z) in Bresenham3d::new((0, 0, 0), (5, 6, 7)) {
        print!("({}, {}, {}), ", x, y, z);
    }
}
(0, 0, 0), (1, 1, 1), (1, 2, 2), (2, 3, 3), (3, 3, 4), (4, 4, 5), (4, 5, 6), (5, 6, 7),

Methods

impl<T: SignedNum> Bresenham3d<T>[src]

pub fn new(start: Voxel<T>, end: Voxel<T>) -> Self[src]

Important traits for Steps<T, I>
pub fn steps(self) -> Steps<Voxel<T>, Self>[src]

Trait Implementations

impl<T: SignedNum> Iterator for Bresenham3d<T>[src]

type Item = Voxel<T>

The type of the elements being iterated over.

Auto Trait Implementations

impl<T> Send for Bresenham3d<T> where
    T: Send

impl<T> Unpin for Bresenham3d<T> where
    T: Unpin

impl<T> Sync for Bresenham3d<T> where
    T: Sync

impl<T> UnwindSafe for Bresenham3d<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for Bresenham3d<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]