#[non_exhaustive]pub enum ProjectionError {
Matrix(MatrixError),
InvalidViewport,
UnsupportedInfiniteFar,
InvalidClipVolume,
BehindCamera,
NonFiniteScreen,
NonFiniteDepth,
OutsideViewport,
OutsideDepth,
ResultOutOfRange,
DegenerateRay,
}Expand description
Checked projection/preparation failure, with no fallback camera or point.
use ferravex_math::projection::ProjectionError;
let error: &dyn std::error::Error = &ProjectionError::OutsideViewport;
assert!(error.to_string().contains("viewport"));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Matrix(MatrixError)
Existing checked matrix diagnostic (including singular, nonfinite, zero W, or an unrepresentable projected coordinate).
InvalidViewport
Nonfinite viewport, extent below one, or overflowing/collapsed f32 edges.
UnsupportedInfiniteFar
The caller declared an infinite far plane, which this API does not support.
InvalidClipVolume
A corner has nonpositive inverse W. The declared closed clip volume touches/crosses infinity or lies outside the supported positive-W half-space.
BehindCamera
Projected point has negative homogeneous W.
NonFiniteScreen
Screen input contains NaN or infinity (checked before membership).
NonFiniteDepth
NDC depth input is NaN or infinity (checked before membership).
OutsideViewport
Screen input is outside the inclusive viewport.
OutsideDepth
Finite NDC depth input is outside the inclusive declared depth interval.
ResultOutOfRange
A screen output cannot round to finite f32.
DegenerateRay
Rounded near/far world endpoints coincide; no direction can be normalized.
Trait Implementations§
Source§impl Clone for ProjectionError
impl Clone for ProjectionError
Source§fn clone(&self) -> ProjectionError
fn clone(&self) -> ProjectionError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more