pub struct Shutter {
pub angle_degrees: f32,
pub phase_degrees: f32,
pub samples: u32,
}Expand description
A rotary shutter: the part of each frame during which motion is recorded.
A clip or transform node marked motion_blur is drawn as the average of its placements at the
midpoints of equal parts of the open interval; the picture placed is the one at the frame
time.
Fields§
§angle_degrees: f32How long the shutter is open, 360 being one whole frame. Above 0, at most
MAX_SHUTTER_ANGLE_DEGREES.
phase_degrees: f32Where the open interval starts relative to the frame time, 360 being one frame. Within
MAX_SHUTTER_PHASE_DEGREES either way; -90 with an angle of 180 centres the interval on
the frame time.
samples: u32Most samples averaged: a power of two from MIN_SHUTTER_SAMPLES to
MAX_SHUTTER_SAMPLES. Slow motion uses fewer.
Implementations§
Source§impl Shutter
impl Shutter
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Whether every field has its default, in which case a document leaves the shutter out.
Sourcepub fn validate(&self) -> Result<(), ShutterProblem>
pub fn validate(&self) -> Result<(), ShutterProblem>
Sourcepub fn sample_time(
&self,
time: MediaTime,
frame: FrameRate,
index: u32,
count: u32,
) -> MediaTime
pub fn sample_time( &self, time: MediaTime, frame: FrameRate, index: u32, count: u32, ) -> MediaTime
The instant sample index of count reads for the frame at time: the midpoint of the
index-th of count equal parts of the open interval, to the nearest tick (a half rounds
up). One frame is frame’s.