pub struct Frame {
pub attributes: Dict,
}
Expand description
Represents an animation. The chunk is oriented according to the rotation
(_r
) is placed at the position (t
) specified. The Rotation is
instantaneous and happens at the start of the frame. The animation is
interpolated across the sequence of Frames using their positions.
Fields§
§attributes: Dict
The raw attributes as parsed from the .vox
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn new(attributes: Dict) -> Frame
pub fn new(attributes: Dict) -> Frame
Build a new frame from a set of attributes. Note that construction is lazy; parsing happens at query time.
Sourcepub fn orientation(&self) -> Option<Rotation>
pub fn orientation(&self) -> Option<Rotation>
The _r
field in the .vox
spec. Represents the orientation of the
model.
Sourcepub fn position(&self) -> Option<Position>
pub fn position(&self) -> Option<Position>
The _t
field in the .vox
spec. Represents the position of this
frame begins in world space.
Sourcepub fn frame_index(&self) -> Option<u32>
pub fn frame_index(&self) -> Option<u32>
The _f
field in the .vox spec. Represents the frame number that this
keyframe is located at.
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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