pub struct SolveSession { /* private fields */ }Implementations§
Source§impl SolveSession
impl SolveSession
pub fn new(config: SolveConfig) -> SolveSession
pub fn width(&self) -> usize
pub fn height(&self) -> usize
Sourcepub fn analysis_size(&self) -> (usize, usize)
pub fn analysis_size(&self) -> (usize, usize)
Analysis gray size (width, height).
Sourcepub fn graph(&self) -> &PoseGraph
pub fn graph(&self) -> &PoseGraph
The pose graph: the host hydrates it before the first frame and relaxes it after the last.
pub fn graph_mut(&mut self) -> &mut PoseGraph
Sourcepub fn take_graph(&mut self) -> PoseGraph
pub fn take_graph(&mut self) -> PoseGraph
Hands the pose graph over (to relax it once the frames are done), leaving an empty one.
Sourcepub fn take_effects(&mut self) -> Vec<Effect>
pub fn take_effects(&mut self) -> Vec<Effect>
The effects produced since the last call, in order.
Sourcepub fn begin_frame(
&mut self,
index: u32,
time: f64,
scan: ScanFields,
) -> Result<Begin, SolveError>
pub fn begin_frame( &mut self, index: u32, time: f64, scan: ScanFields, ) -> Result<Begin, SolveError>
Starts frame index at time with its scan record.
Sourcepub fn frame_mut(&mut self) -> &mut [u8] ⓘ
pub fn frame_mut(&mut self) -> &mut [u8] ⓘ
The RGBA slot the frame Begin::NeedFrame asked for is written into (width × height × 4 bytes).
Sourcepub fn run_frame(
&mut self,
gray: Option<Vec<u8>>,
features: Option<Vec<Feature>>,
labels: &[u8],
) -> Result<Poll, SolveError>
pub fn run_frame( &mut self, gray: Option<Vec<u8>>, features: Option<Vec<Feature>>, labels: &[u8], ) -> Result<Poll, SolveError>
Solves the frame written into Self::frame_mut. gray is its analysis gray when the host computed one
(else the session computes it); features its stored features, if any. labels is the atlas label plane
(width × height).
Sourcepub fn provide_keyframes(
&mut self,
rows: Vec<Option<Keyframe>>,
labels: &[u8],
) -> Result<Poll, SolveError>
pub fn provide_keyframes( &mut self, rows: Vec<Option<Keyframe>>, labels: &[u8], ) -> Result<Poll, SolveError>
Hands in the rows Poll::NeedKeyframes named, in that order; None for a row the store did not have.
Sourcepub fn drain_voting(&mut self) -> Vec<VotingRecord>
pub fn drain_voting(&mut self) -> Vec<VotingRecord>
Finalises every frame still resident in the voting ring (the end of the pass).
Auto Trait Implementations§
impl Freeze for SolveSession
impl RefUnwindSafe for SolveSession
impl Send for SolveSession
impl Sync for SolveSession
impl Unpin for SolveSession
impl UnsafeUnpin for SolveSession
impl UnwindSafe for SolveSession
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> 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