pub struct FloatingDepthRenderImage { /* private fields */ }Expand description
A depth render image (geometry from an external renderer).
Stores per-pixel radial depth values and optional world-space normals. Used for depth-compositing external renders with the polyscope scene.
Implementations§
Source§impl FloatingDepthRenderImage
impl FloatingDepthRenderImage
Sourcepub fn new(
name: impl Into<String>,
width: u32,
height: u32,
depths: Vec<f32>,
) -> Self
pub fn new( name: impl Into<String>, width: u32, height: u32, depths: Vec<f32>, ) -> Self
Creates a new depth render image.
Sourcepub fn set_normals(&mut self, normals: Vec<Vec3>) -> &mut Self
pub fn set_normals(&mut self, normals: Vec<Vec3>) -> &mut Self
Sets per-pixel world-space normals.
Sourcepub fn origin(&self) -> ImageOrigin
pub fn origin(&self) -> ImageOrigin
Gets the image origin.
Sourcepub fn set_origin(&mut self, origin: ImageOrigin) -> &mut Self
pub fn set_origin(&mut self, origin: ImageOrigin) -> &mut Self
Sets the image origin.
Trait Implementations§
Source§impl Quantity for FloatingDepthRenderImage
impl Quantity for FloatingDepthRenderImage
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns a mutable reference to self as
Any for downcasting.Source§fn structure_name(&self) -> &str
fn structure_name(&self) -> &str
Returns the name of the parent structure.
Source§fn kind(&self) -> QuantityKind
fn kind(&self) -> QuantityKind
Returns the kind of this quantity.
Source§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns whether this quantity is currently enabled/visible.
Source§fn set_enabled(&mut self, enabled: bool)
fn set_enabled(&mut self, enabled: bool)
Sets the enabled state of this quantity.
Source§fn clear_gpu_resources(&mut self)
fn clear_gpu_resources(&mut self)
Clears GPU render resources so they can be re-initialized with a new device.
Auto Trait Implementations§
impl Freeze for FloatingDepthRenderImage
impl RefUnwindSafe for FloatingDepthRenderImage
impl Send for FloatingDepthRenderImage
impl Sync for FloatingDepthRenderImage
impl Unpin for FloatingDepthRenderImage
impl UnsafeUnpin for FloatingDepthRenderImage
impl UnwindSafe for FloatingDepthRenderImage
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
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>
Converts
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>
Converts
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