Skip to main content

GpuSpatialFrame

Struct GpuSpatialFrame 

Source
pub struct GpuSpatialFrame { /* private fields */ }
Expand description

Owned GPU-resident point frame with explicit schema and device identity.

Implementations§

Source§

impl GpuSpatialFrame

Source

pub fn new( runtime: &WgpuRuntime, schema: PointSchema, positions: GpuAoSoXyzBuffer, ) -> SpatialResult<Self>

Creates a frame owning interleaved positions on runtime.

Source

pub const fn schema(&self) -> &PointSchema

Returns the source point schema.

Source

pub const fn point_count(&self) -> usize

Returns the number of source points.

Source

pub const fn positions(&self) -> &GpuAoSoXyzBuffer

Returns retained interleaved positions.

Source

pub const fn normals(&self) -> Option<&GpuAoSoNormals>

Returns retained normals when attached.

Source

pub const fn voxel_segments(&self) -> Option<&GpuVoxelSegments>

Returns retained voxel segments when attached.

Source

pub const fn radius_grid(&self) -> Option<&GpuAoSoRadiusGrid>

Returns retained radius grid when attached.

Source

pub const fn receipt(&self) -> &GpuExecutionReceipt

Returns execution and transfer accounting.

Source

pub fn has_capability(&self, capability: GpuFrameCapability) -> bool

Returns whether a capability is currently attached.

Source

pub fn validate_runtime(&self, runtime: &WgpuRuntime) -> SpatialResult<()>

Verifies that runtime owns the frame’s buffers.

Source

pub fn attach_normals( &mut self, runtime: &WgpuRuntime, normals: GpuAoSoNormals, ) -> SpatialResult<()>

Attaches per-point normal output after validating length and device.

Source

pub fn attach_voxel_segments( &mut self, segments: GpuVoxelSegments, ) -> SpatialResult<()>

Attaches voxel segments after validating their source point count.

Source

pub fn attach_radius_grid( &mut self, grid: GpuAoSoRadiusGrid, ) -> SpatialResult<()>

Attaches a sparse radius grid after validating its point count.

Source

pub fn attach_attributes( &mut self, runtime: &WgpuRuntime, attributes: Vec<GpuAoSoAttributeChunk>, ) -> SpatialResult<()>

Attaches interleaved attribute chunks after validating total length.

Source

pub fn rebuild_radius_grid( &mut self, runtime: &WgpuRuntime, radius: f32, ) -> SpatialResult<()>

Rebuilds the sparse radius grid from retained positions.

Source

pub fn estimate_normals( &mut self, runtime: &WgpuRuntime, radius: f32, ) -> SpatialResult<()>

Estimates normals using a cached matching grid or rebuilds it first.

Source

pub fn reduce_attributes( &mut self, runtime: &WgpuRuntime, aggregation: AoSoAAttributeAggregation, ) -> SpatialResult<AoSoAAttributeReduction>

Reduces attached interleaved attributes using retained voxel segments.

Source

pub fn readback_positions( &mut self, runtime: &WgpuRuntime, ) -> SpatialResult<Vec<[f32; 3]>>

Explicitly reads interleaved positions back to CPU memory.

Source

pub fn recycle(self, runtime: &WgpuRuntime) -> SpatialResult<()>

Recycles pooled frame buffers after validating the runtime device.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,