pub struct Camera {
pub center: Point,
pub zoom: f64,
pub rotation: f64,
}Expand description
f64 inverse-view parameters; scene time remains caller-owned.
Fields§
§center: PointWorld point placed at the current design viewport’s center.
zoom: f64Positive logical units per world unit.
rotation: f64Clockwise camera orientation in radians; content rotates oppositely.
Implementations§
Source§impl Camera
impl Camera
Sourcepub fn world_to_screen(
self,
context: &SceneContext<'_>,
point: Point,
) -> Result<Point, ValidationError>
pub fn world_to_screen( self, context: &SceneContext<'_>, point: Point, ) -> Result<Point, ValidationError>
Projects a world point without clipping or including ancestor transforms.
Sourcepub fn screen_to_world(
self,
context: &SceneContext<'_>,
point: Point,
) -> Result<Point, ValidationError>
pub fn screen_to_world( self, context: &SceneContext<'_>, point: Point, ) -> Result<Point, ValidationError>
Unprojects a design-viewport point, including points outside the viewport.
Trait Implementations§
impl Copy for Camera
impl StructuralPartialEq for Camera
Auto Trait Implementations§
impl Forget for Camera
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnsafeUnpin for Camera
impl UnwindSafe for Camera
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