pub enum Camera2dError {
InvalidCenter {
center: Vec2,
},
InvalidZoom {
zoom: f32,
},
InvalidRotation {
rotation: f32,
},
InvalidPickingInput {
screen: LogicalScreenPosition,
depth: f32,
},
SingularProjection {
tilt: f32,
},
InvalidProjectionInput {
world: Vec2,
depth: f32,
},
ProjectionOverflow {
world: Vec2,
depth: f32,
},
InvalidPan {
delta: Vec2,
},
InvalidZoomFactor {
factor: f32,
},
InvalidFitBounds {
bounds: Rect,
padding: f32,
},
}Expand description
Invalid camera configuration or inverse projection request.
Variants§
InvalidCenter
Camera center must contain finite world coordinates.
InvalidZoom
Zoom must be finite and strictly positive because it is logical pixels per world unit.
InvalidRotation
Camera rotation must be finite.
InvalidPickingInput
Screen coordinates and pseudo-depth used for picking must be finite.
Fields
screen: LogicalScreenPositionRejected point in logical screen pixels.
SingularProjection
The current projection collapses the requested picking plane.
InvalidProjectionInput
World coordinates or depth supplied for forward projection are non-finite.
ProjectionOverflow
Finite forward-projection inputs overflowed logical screen coordinates.
Fields
InvalidPan
World-space panning delta was non-finite or overflowed the center.
InvalidZoomFactor
Cursor-centered zoom needs a finite, strictly positive multiplier.
InvalidFitBounds
Bounds fitting requires finite, non-empty bounds and usable padding.
Trait Implementations§
Source§impl Clone for Camera2dError
impl Clone for Camera2dError
Source§fn clone(&self) -> Camera2dError
fn clone(&self) -> Camera2dError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Camera2dError
Source§impl Debug for Camera2dError
impl Debug for Camera2dError
Source§impl Display for Camera2dError
impl Display for Camera2dError
Source§impl Error for Camera2dError
impl Error for Camera2dError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for Camera2dError
impl PartialEq for Camera2dError
impl StructuralPartialEq for Camera2dError
Auto Trait Implementations§
impl Freeze for Camera2dError
impl RefUnwindSafe for Camera2dError
impl Send for Camera2dError
impl Sync for Camera2dError
impl Unpin for Camera2dError
impl UnsafeUnpin for Camera2dError
impl UnwindSafe for Camera2dError
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,
impl<T> ConditionalSend for Twhere
T: Send,
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.