[−][src]Struct lasy::stream::frame::Builder
A type allowing to build a raw laser stream.
Fields
builder: Builder
model: M
render: F
process_raw: R
frame_hz: Option<u32>
interpolation_conf: InterpolationConfigBuilder
Methods
impl<M, F, R> Builder<M, F, R>
[src]
pub fn detected_dac(self, dac: DetectedDac) -> Self
[src]
The DAC with which the stream should be established.
pub fn point_hz(self, point_hz: u32) -> Self
[src]
The initial rate at which the DAC should process points per second.
This value should be no greater than the detected DAC's max_point_hz
.
By default this value is stream::DEFAULT_POINT_HZ
.
pub fn frame_hz(self, frame_hz: u32) -> Self
[src]
The initial rate at which the DAC should output frames per second.
This in combination with the point_hz
is used to determine the points_per_frame
. Frames
yielded by the user will be interpolated so that they always use exactly points_per_frame
number of points per frame.
By default, this value is stream::DEFAULT_FRAME_HZ
.
pub fn latency_points(self, points: u32) -> Self
[src]
The maximum latency specified as a number of points.
Each time the laser indicates its "fullness", the raw stream will request enough points
from the render function to fill the DAC buffer up to latency_points
.
pub fn distance_per_point(self, dpp: f32) -> Self
[src]
The minimum distance the interpolator can travel along an edge before a new point is required.
By default, this value is InterpolationConfig::DEFAULT_DISTANCE_PER_POINT
.
pub fn blank_delay_points(self, points: u32) -> Self
[src]
The number of points to insert at the end of a blank to account for light modulator delay.
By default, this value is InterpolationConfig::DEFAULT_BLANK_DELAY_POINTS
.
pub fn radians_per_point(self, radians: f32) -> Self
[src]
The amount of delay to add based on the angle of the corner in radians.
By default, this value is InterpolationConfig::DEFAULT_RADIANS_PER_POINT
.
pub fn process_raw<R2>(self, process_raw: R2) -> Builder<M, F, R2>
[src]
Specify a function that allows for processing the raw points before submission to the DAC.
This mgiht be useful for:
- applying post-processing effects onto the optimised, interpolated points.
- monitoring the raw points resulting from the optimisation and interpolation processes.
- tuning brightness of colours based on safety zones.
The given function will get called right before submission of the optimised, interpolated buffer.
pub fn build(self) -> Result<Stream<M>> where
M: 'static + Send,
F: 'static + RenderFn<M> + Send,
R: 'static + RenderFn<M> + Send,
[src]
M: 'static + Send,
F: 'static + RenderFn<M> + Send,
R: 'static + RenderFn<M> + Send,
Build the stream with the specified parameters.
Note: If no dac
was specified, this will method will block until a DAC is detected.
The first detected DAC is the DAC with which a stream will be established.
Auto Trait Implementations
impl<M, F, R> Send for Builder<M, F, R> where
F: Send,
M: Send,
R: Send,
F: Send,
M: Send,
R: Send,
impl<M, F, R> Sync for Builder<M, F, R> where
F: Sync,
M: Sync,
R: Sync,
F: Sync,
M: Sync,
R: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,