pub struct Edge<T>(pub T, pub T);Expand description
A line segment between two vertices.
Tuple Fields§
§0: T§1: TTrait Implementations§
Source§impl<V: Vary> Render<V> for Edge<usize>
impl<V: Vary> Render<V> for Edge<usize>
Source§type Screen = Edge<Vertex<Point<[f32; 3], Real<3, Screen>>, V>>
type Screen = Edge<Vertex<Point<[f32; 3], Real<3, Screen>>, V>>
The type of this primitive in screen space.
Source§fn inline(Edge: Edge<usize>, vs: &[ClipVert<V>]) -> Self::Clip
fn inline(Edge: Edge<usize>, vs: &[ClipVert<V>]) -> Self::Clip
Maps the indexes of the argument to vertices.
Source§fn to_screen(e: Self::Clip, tf: &Mat4x4<NdcToScreen>) -> Self::Screen
fn to_screen(e: Self::Clip, tf: &Mat4x4<NdcToScreen>) -> Self::Screen
Transforms the argument from NDC to screen space.
Source§fn rasterize<F: FnMut(Scanline<V>)>(e: Self::Screen, scanline_fn: F)
fn rasterize<F: FnMut(Scanline<V>)>(e: Self::Screen, scanline_fn: F)
Rasterizes the argument by calling the function for each scanline.
Source§fn is_backface(_: &Self::Screen) -> bool
fn is_backface(_: &Self::Screen) -> bool
Returns whether the argument is facing away from the camera.
impl<T: Copy> Copy for Edge<T>
impl<T: Eq> Eq for Edge<T>
impl<T> StructuralPartialEq for Edge<T>
Auto Trait Implementations§
impl<T> Freeze for Edge<T>where
T: Freeze,
impl<T> RefUnwindSafe for Edge<T>where
T: RefUnwindSafe,
impl<T> Send for Edge<T>where
T: Send,
impl<T> Sync for Edge<T>where
T: Sync,
impl<T> Unpin for Edge<T>where
T: Unpin,
impl<T> UnwindSafe for Edge<T>where
T: UnwindSafe,
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