pub struct MultiCamGroup {
pub id: MultiCamId,
pub name: String,
pub angles: Vec<CameraAngle>,
pub switches: Vec<AngleSwitch>,
/* private fields */
}Expand description
A multi-camera editing group.
Contains multiple CameraAngles that cover the same event, plus
a list of AngleSwitches that define which angle is on-screen at
each point in the output timeline.
Fields§
§id: MultiCamIdUnique multi-cam ID.
name: StringHuman-readable name.
angles: Vec<CameraAngle>Camera angles in this group.
switches: Vec<AngleSwitch>Switch list (sorted by position).
Implementations§
Source§impl MultiCamGroup
impl MultiCamGroup
Sourcepub fn new(id: MultiCamId, name: String) -> Self
pub fn new(id: MultiCamId, name: String) -> Self
Create a new multi-cam group.
Sourcepub fn add_angle(&mut self, label: String) -> AngleId
pub fn add_angle(&mut self, label: String) -> AngleId
Add a new camera angle and return its ID.
Sourcepub fn remove_angle(&mut self, angle_id: AngleId) -> Option<CameraAngle>
pub fn remove_angle(&mut self, angle_id: AngleId) -> Option<CameraAngle>
Remove a camera angle by ID.
Sourcepub fn get_angle(&self, angle_id: AngleId) -> Option<&CameraAngle>
pub fn get_angle(&self, angle_id: AngleId) -> Option<&CameraAngle>
Get an angle by ID.
Sourcepub fn get_angle_mut(&mut self, angle_id: AngleId) -> Option<&mut CameraAngle>
pub fn get_angle_mut(&mut self, angle_id: AngleId) -> Option<&mut CameraAngle>
Get a mutable angle by ID.
Sourcepub fn add_switch(&mut self, position: i64, angle_id: AngleId) -> EditResult<()>
pub fn add_switch(&mut self, position: i64, angle_id: AngleId) -> EditResult<()>
Add a switch point (cut to a different angle).
Sourcepub fn remove_switch_at(&mut self, position: i64) -> Option<AngleSwitch>
pub fn remove_switch_at(&mut self, position: i64) -> Option<AngleSwitch>
Remove the switch at a given position.
Sourcepub fn active_angle_at(&self, position: i64) -> Option<AngleId>
pub fn active_angle_at(&self, position: i64) -> Option<AngleId>
Get the active angle at a given timeline position.
Finds the most recent switch at or before position.
Sourcepub fn sync_all_angles(&mut self)
pub fn sync_all_angles(&mut self)
Synchronize all angles by computing their alignment offsets.
Sourcepub fn angle_count(&self) -> usize
pub fn angle_count(&self) -> usize
Get the total number of angles.
Sourcepub fn switch_count(&self) -> usize
pub fn switch_count(&self) -> usize
Get the total number of switches.
Trait Implementations§
Source§impl Clone for MultiCamGroup
impl Clone for MultiCamGroup
Source§fn clone(&self) -> MultiCamGroup
fn clone(&self) -> MultiCamGroup
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiCamGroup
impl RefUnwindSafe for MultiCamGroup
impl Send for MultiCamGroup
impl Sync for MultiCamGroup
impl Unpin for MultiCamGroup
impl UnsafeUnpin for MultiCamGroup
impl UnwindSafe for MultiCamGroup
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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