pub struct ProjectedPoint3d { /* private fields */ }Expand description
Result of projecting a 3D point into a logical viewport.
Implementations§
Source§impl ProjectedPoint3d
impl ProjectedPoint3d
Sourcepub const fn logical_position(self) -> LogicalScreenPosition
pub const fn logical_position(self) -> LogicalScreenPosition
Returns the point in logical screen pixels with a top-left origin.
Sourcepub const fn view_depth(self) -> f32
pub const fn view_depth(self) -> f32
Returns positive distance along the camera forward axis in world units.
Sourcepub const fn normalized_depth(self) -> f32
pub const fn normalized_depth(self) -> f32
Returns the hardware depth value, normally in 0.0..=1.0.
Orthographic depth is linear. Perspective depth follows the nonlinear projection used by the GPU depth attachment so CPU anchors and rendered surfaces share one visibility coordinate.
Sourcepub const fn inside_view(self) -> bool
pub const fn inside_view(self) -> bool
Returns whether the point lies inside every configured clip boundary.
Trait Implementations§
Source§impl Clone for ProjectedPoint3d
impl Clone for ProjectedPoint3d
impl Copy for ProjectedPoint3d
Source§impl Debug for ProjectedPoint3d
impl Debug for ProjectedPoint3d
Source§impl PartialEq for ProjectedPoint3d
impl PartialEq for ProjectedPoint3d
impl StructuralPartialEq for ProjectedPoint3d
Auto Trait Implementations§
impl Freeze for ProjectedPoint3d
impl RefUnwindSafe for ProjectedPoint3d
impl Send for ProjectedPoint3d
impl Sync for ProjectedPoint3d
impl Unpin for ProjectedPoint3d
impl UnsafeUnpin for ProjectedPoint3d
impl UnwindSafe for ProjectedPoint3d
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