Skip to main content

RecPlayer

Struct RecPlayer 

Source
pub struct RecPlayer {
Show 22 fields pub data: Vec<u8>, pub header_end: i32, pub registry_end: i32, pub length_scale: f32, pub previous_length_scale: f32, pub frame: i32, pub frame_count: i32, pub recorded_dt: f32, pub recorded_sub_step_count: i32, pub bounds: Aabb, pub at_end: bool, pub at_pre_step: bool, pub diverge_frame: i32, pub body_ids: Vec<BodyId>, pub frame0_body_ids: Vec<BodyId>, pub keyframe_interval: i32, pub keyframe_min_interval: i32, pub keyframe_budget: usize, pub keyframe_bytes: usize, pub last_keyframe_frame: i32, pub world: World, pub frame_queries: Vec<FrameQuery>, /* private fields */
}
Expand description

Interactive / headless recording player. (b3RecPlayer)

Fields§

§data: Vec<u8>§header_end: i32§registry_end: i32§length_scale: f32§previous_length_scale: f32§frame: i32§frame_count: i32§recorded_dt: f32§recorded_sub_step_count: i32§bounds: Aabb§at_end: bool§at_pre_step: bool§diverge_frame: i32§body_ids: Vec<BodyId>§frame0_body_ids: Vec<BodyId>§keyframe_interval: i32§keyframe_min_interval: i32§keyframe_budget: usize§keyframe_bytes: usize§last_keyframe_frame: i32§world: World§frame_queries: Vec<FrameQuery>

Implementations§

Source§

impl RecPlayer

Source

pub fn create(data: &[u8], _worker_count: i32) -> Option<Box<Self>>

(b3RecPlayer_Create)

Source

pub fn track_body_create(&mut self, id: BodyId)

Source

pub fn track_body_destroy(&mut self, id: BodyId)

Source

pub fn step_frame(&mut self) -> bool

(b3RecPlayer_StepFrame)

Source

pub fn sub_step_frame(&mut self)

Park before Step when a CreateBody led the frame. (b3RecPlayer_SubStepFrame)

Source

pub fn restart(&mut self)

(b3RecPlayer_Restart)

Source

pub fn seek_frame(&mut self, target_frame: i32)

(b3RecPlayer_SeekFrame)

Source

pub fn has_diverged(&self) -> bool

Source

pub fn get_diverge_frame(&self) -> i32

Source

pub fn get_frame(&self) -> i32

Source

pub fn get_frame_count(&self) -> i32

Source

pub fn is_at_end(&self) -> bool

Source

pub fn is_at_pre_step(&self) -> bool

Source

pub fn get_body_count(&self) -> i32

Source

pub fn get_body_id(&self, index: i32) -> BodyId

Source

pub fn world(&self) -> &World

Source

pub fn world_mut(&mut self) -> &mut World

Source

pub fn get_info(&self) -> RecPlayerInfo

(b3RecPlayer_GetInfo)

Source

pub fn set_keyframe_policy( &mut self, budget_bytes: usize, min_interval_frames: i32, )

(b3RecPlayer_SetKeyframePolicy)

Source

pub fn get_keyframe_min_interval(&self) -> i32

Source

pub fn get_keyframe_interval(&self) -> i32

Source

pub fn get_keyframe_budget(&self) -> usize

Source

pub fn get_keyframe_bytes(&self) -> usize

Source

pub fn get_frame_query_count(&self) -> i32

Source

pub fn get_frame_query(&self, index: i32) -> Option<&FrameQuery>

Source

pub fn resolve_tag(&self, key: u64) -> Option<&RecTag>

Trait Implementations§

Source§

impl Drop for RecPlayer

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.