pub struct MotionVectorParams {
pub grid_x: u32,
pub grid_y: u32,
pub dx: f32,
pub dy: f32,
pub length: f32,
pub color: [f32; 4],
}Expand description
Motion-vector grid parameters.
MD2 draws an n_x × n_y grid of short line segments into the warp
output every frame; the feedback path then pulls them into trails
that visualise the per-pixel motion field. Trails emerge from the
warp, the segments themselves are stateless — we just paint them
at the same screen-space grid every frame, offset by (dx, dy).
MD2 caps the grid at 64 × 48 and the renderer enforces the same
clamp regardless of what the preset declares.
Fields§
§grid_x: u32Grid width in cells, clamped to [0, 64].
grid_y: u32Grid height in cells, clamped to [0, 48].
dx: f32Horizontal grid offset in MD2 preset-UV units [0, 1]. Typical
presets animate this so the grid drifts across the screen.
dy: f32Vertical grid offset in MD2 preset-UV units [0, 1].
length: f32Segment length as a fraction of horizontal cell spacing.
color: [f32; 4]Segment colour RGBA. a == 0.0 → no draw.
Trait Implementations§
Source§impl Clone for MotionVectorParams
impl Clone for MotionVectorParams
Source§fn clone(&self) -> MotionVectorParams
fn clone(&self) -> MotionVectorParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MotionVectorParams
impl Debug for MotionVectorParams
Source§impl Default for MotionVectorParams
impl Default for MotionVectorParams
impl Copy for MotionVectorParams
Auto Trait Implementations§
impl Freeze for MotionVectorParams
impl RefUnwindSafe for MotionVectorParams
impl Send for MotionVectorParams
impl Sync for MotionVectorParams
impl Unpin for MotionVectorParams
impl UnwindSafe for MotionVectorParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().