pub struct FrameGeom {
pub fit: (f32, f32, f32),
pub look: [f32; 2],
pub density: f32,
pub viewport_px: [f32; 2],
pub roll: f32,
pub pivot: [f32; 2],
}Expand description
One painted frame’s geometry, shared between viewports (writers)
and world-anchored siblings such as ActorFrame (readers).
Maps either direction so board sprites, picks, and actor
surfaces track together, including under camera shake.
Timing: layout publishes ahead of prepare and paint re-publishes;
composition-time readers see the previous frame’s geometry, so
placement trails the board by one frame under camera motion.
Event-time readers (picks) see the latest publish.
Fields§
§fit: (f32, f32, f32)Effective dp fit of the world extent: (scale, off_x, off_y) from
effective_fit (contain-fit scaled by zoom/units_per_pixel).
look: [f32; 2]Look-point shift in world units: cam.effective_center() - world / 2.
Zero when the camera is default.
density: f32Physical px per dp at paint time.
viewport_px: [f32; 2]Painted viewport size in physical px (drives the GPU camera).
roll: f32Camera roll in radians around the look point.
pivot: [f32; 2]Camera look point in world coords at publish time.
Roll pivot for surface_dp and picks.
Trait Implementations§
impl Copy for FrameGeom
Auto Trait Implementations§
impl Freeze for FrameGeom
impl RefUnwindSafe for FrameGeom
impl Send for FrameGeom
impl Sync for FrameGeom
impl Unpin for FrameGeom
impl UnsafeUnpin for FrameGeom
impl UnwindSafe for FrameGeom
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
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.