pub struct Buffer { /* private fields */ }Expand description
Handle to a buffer managed by Embree.
Implementations§
Source§impl Buffer
impl Buffer
Sourcepub unsafe fn handle(&self) -> RTCBuffer
pub unsafe fn handle(&self) -> RTCBuffer
Returns the raw handle to the buffer.
§Safety
Use this function only if you know what you are doing. The returned handle is a raw pointer to an Embree reference-counted object. The reference count is not increased by this function, so the caller must ensure that the handle is not used after the buffer object is destroyed.
Sourcepub fn mapped_range<S: RangeBounds<usize>, T>(
&self,
bounds: S,
) -> BufferView<'_, T>
pub fn mapped_range<S: RangeBounds<usize>, T>( &self, bounds: S, ) -> BufferView<'_, T>
Slices into the buffer for the given range.
§Arguments
bounds- The range of indices to slice into the buffer.- Ranges with no end will slice to the end of the buffer.
- Totally unbounded range (..) will slice the entire buffer.
Sourcepub fn mapped_range_mut<S: RangeBounds<usize>, T>(
&mut self,
bounds: S,
) -> BufferViewMut<'_, T>
pub fn mapped_range_mut<S: RangeBounds<usize>, T>( &mut self, bounds: S, ) -> BufferViewMut<'_, T>
Mutable slice into the buffer for the given range.
§Arguments
bounds- The range of indices to slice into the buffer.
- Ranges with no end will slice to the end of the buffer.
- Totally unbounded range (..) will slice the entire buffer.
Trait Implementations§
Auto Trait Implementations§
impl !Send for Buffer
impl !Sync for Buffer
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Unpin for Buffer
impl UnsafeUnpin for Buffer
impl UnwindSafe for Buffer
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