pub enum ViewportConversionError {
NoViewportSize,
PastNearPlane,
PastFarPlane,
InvalidData,
}
Expand description
Error returned when a conversion between world-space and viewport-space coordinates fails.
See world_to_viewport
and viewport_to_world
.
Variants§
NoViewportSize
The pre-computed size of the viewport was not available.
This may be because the Camera
was just created and camera_system
has not been executed
yet, or because the RenderTarget
is misconfigured in one of the following ways:
- it references the
PrimaryWindow
when there is none, - it references a
Window
entity that doesn’t exist or doesn’t actually have aWindow
component, - it references an
Image
that doesn’t exist (invalid handle), - it references a
TextureView
that doesn’t exist (invalid handle).
PastNearPlane
The computed coordinate was beyond the Camera
’s near plane.
Only applicable when converting from world-space to viewport-space.
PastFarPlane
The computed coordinate was beyond the Camera
’s far plane.
Only applicable when converting from world-space to viewport-space.
InvalidData
The Normalized Device Coordinates could not be computed because the camera_transform
, the
world_position
, or the projection matrix defined by CameraProjection
contained NAN
(see world_to_ndc
and ndc_to_world
).
Trait Implementations§
source§impl Clone for ViewportConversionError
impl Clone for ViewportConversionError
source§fn clone(&self) -> ViewportConversionError
fn clone(&self) -> ViewportConversionError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ViewportConversionError
impl Debug for ViewportConversionError
source§impl PartialEq for ViewportConversionError
impl PartialEq for ViewportConversionError
impl Copy for ViewportConversionError
impl Eq for ViewportConversionError
impl StructuralPartialEq for ViewportConversionError
Auto Trait Implementations§
impl Freeze for ViewportConversionError
impl RefUnwindSafe for ViewportConversionError
impl Send for ViewportConversionError
impl Sync for ViewportConversionError
impl Unpin for ViewportConversionError
impl UnwindSafe for ViewportConversionError
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more