#[repr(C, align(4))]pub struct TriGouraud {
pub tag: u32,
pub color0_cmd: u32,
pub v0: u32,
pub color1: u32,
pub v1: u32,
pub color2: u32,
pub v2: u32,
}Expand description
Gouraud-shaded triangle. 7 words (tag + 6 data).
Fields§
§tag: u32OT linkage.
color0_cmd: u32Vertex 0: opcode | color0.
v0: u32Vertex 0 position.
color1: u32Vertex 1 color.
v1: u32Vertex 1 position.
color2: u32Vertex 2 color.
v2: u32Vertex 2 position.
Implementations§
Source§impl TriGouraud
impl TriGouraud
Sourcepub const fn new(verts: [(i16, i16); 3], colors: [(u8, u8, u8); 3]) -> Self
pub const fn new(verts: [(i16, i16); 3], colors: [(u8, u8, u8); 3]) -> Self
Build a Gouraud-shaded triangle.
Sourcepub const fn translucent(self) -> Self
pub const fn translucent(self) -> Self
The same triangle drawn with the semi-transparency equation set by the
last GP0(E1h) (crate::Gpu::set_draw_mode).
Trait Implementations§
Source§impl Clone for TriGouraud
impl Clone for TriGouraud
Source§fn clone(&self) -> TriGouraud
fn clone(&self) -> TriGouraud
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriGouraud
impl Debug for TriGouraud
Source§impl GpuPacket for TriGouraud
impl GpuPacket for TriGouraud
Source§impl Hash for TriGouraud
impl Hash for TriGouraud
Source§impl PartialEq for TriGouraud
impl PartialEq for TriGouraud
impl Copy for TriGouraud
impl Eq for TriGouraud
impl StructuralPartialEq for TriGouraud
Auto Trait Implementations§
impl Freeze for TriGouraud
impl RefUnwindSafe for TriGouraud
impl Send for TriGouraud
impl Sync for TriGouraud
impl Unpin for TriGouraud
impl UnsafeUnpin for TriGouraud
impl UnwindSafe for TriGouraud
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)