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()