pub struct SceneDepthMap {
pub camera: ResolvedCamera,
pub rect: Rect,
pub width: u32,
pub height: u32,
pub depth: Arc<[f32]>,
}Expand description
A captured scene depth buffer plus the camera/viewport that produced it.
Depth values are row-major, length width * height, in normalised
device depth [0, 1] (0 near, 1 far). The backend constructs one
per Scene3D node each frame; UiState holds
the latest available map keyed by the node’s computed_id.
Fields§
§camera: ResolvedCameraThe resolved camera that rendered this depth map.
rect: RectThe scene viewport rect (logical px) at capture time.
width: u32Depth grid width in pixels (physical resolution of the offscreen).
height: u32Depth grid height in pixels.
depth: Arc<[f32]>Row-major normalised depth, width * height values.
Implementations§
Source§impl SceneDepthMap
impl SceneDepthMap
Sourcepub fn occludes(&self, world: Vec3) -> bool
pub fn occludes(&self, world: Vec3) -> bool
Whether world is hidden behind solid scene geometry, judged in the
camera/viewport this map was captured with.
Returns true (occluded) for points behind the camera or projecting
outside the map — the conservative choice, matching the
“occlude until we know otherwise” contract above. Only geometry that
writes depth (meshes) occludes; points and lines do not.
Trait Implementations§
Source§impl Clone for SceneDepthMap
impl Clone for SceneDepthMap
Source§fn clone(&self) -> SceneDepthMap
fn clone(&self) -> SceneDepthMap
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SceneDepthMap
impl RefUnwindSafe for SceneDepthMap
impl Send for SceneDepthMap
impl Sync for SceneDepthMap
impl Unpin for SceneDepthMap
impl UnsafeUnpin for SceneDepthMap
impl UnwindSafe for SceneDepthMap
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.