pub struct GpuSpatialFrame { /* private fields */ }Expand description
Owned GPU-resident point frame with explicit schema and device identity.
Implementations§
Source§impl GpuSpatialFrame
impl GpuSpatialFrame
Sourcepub fn new(
runtime: &WgpuRuntime,
schema: PointSchema,
positions: GpuAoSoXyzBuffer,
) -> SpatialResult<Self>
pub fn new( runtime: &WgpuRuntime, schema: PointSchema, positions: GpuAoSoXyzBuffer, ) -> SpatialResult<Self>
Creates a frame owning interleaved positions on runtime.
Sourcepub const fn schema(&self) -> &PointSchema
pub const fn schema(&self) -> &PointSchema
Returns the source point schema.
Sourcepub const fn point_count(&self) -> usize
pub const fn point_count(&self) -> usize
Returns the number of source points.
Sourcepub const fn positions(&self) -> &GpuAoSoXyzBuffer
pub const fn positions(&self) -> &GpuAoSoXyzBuffer
Returns retained interleaved positions.
Sourcepub const fn normals(&self) -> Option<&GpuAoSoNormals>
pub const fn normals(&self) -> Option<&GpuAoSoNormals>
Returns retained normals when attached.
Sourcepub const fn voxel_segments(&self) -> Option<&GpuVoxelSegments>
pub const fn voxel_segments(&self) -> Option<&GpuVoxelSegments>
Returns retained voxel segments when attached.
Sourcepub const fn radius_grid(&self) -> Option<&GpuAoSoRadiusGrid>
pub const fn radius_grid(&self) -> Option<&GpuAoSoRadiusGrid>
Returns retained radius grid when attached.
Sourcepub const fn receipt(&self) -> &GpuExecutionReceipt
pub const fn receipt(&self) -> &GpuExecutionReceipt
Returns execution and transfer accounting.
Sourcepub fn has_capability(&self, capability: GpuFrameCapability) -> bool
pub fn has_capability(&self, capability: GpuFrameCapability) -> bool
Returns whether a capability is currently attached.
Sourcepub fn validate_runtime(&self, runtime: &WgpuRuntime) -> SpatialResult<()>
pub fn validate_runtime(&self, runtime: &WgpuRuntime) -> SpatialResult<()>
Verifies that runtime owns the frame’s buffers.
Sourcepub fn attach_normals(
&mut self,
runtime: &WgpuRuntime,
normals: GpuAoSoNormals,
) -> SpatialResult<()>
pub fn attach_normals( &mut self, runtime: &WgpuRuntime, normals: GpuAoSoNormals, ) -> SpatialResult<()>
Attaches per-point normal output after validating length and device.
Sourcepub fn attach_voxel_segments(
&mut self,
segments: GpuVoxelSegments,
) -> SpatialResult<()>
pub fn attach_voxel_segments( &mut self, segments: GpuVoxelSegments, ) -> SpatialResult<()>
Attaches voxel segments after validating their source point count.
Sourcepub fn attach_radius_grid(
&mut self,
grid: GpuAoSoRadiusGrid,
) -> SpatialResult<()>
pub fn attach_radius_grid( &mut self, grid: GpuAoSoRadiusGrid, ) -> SpatialResult<()>
Attaches a sparse radius grid after validating its point count.
Sourcepub fn attach_attributes(
&mut self,
runtime: &WgpuRuntime,
attributes: Vec<GpuAoSoAttributeChunk>,
) -> SpatialResult<()>
pub fn attach_attributes( &mut self, runtime: &WgpuRuntime, attributes: Vec<GpuAoSoAttributeChunk>, ) -> SpatialResult<()>
Attaches interleaved attribute chunks after validating total length.
Sourcepub fn rebuild_radius_grid(
&mut self,
runtime: &WgpuRuntime,
radius: f32,
) -> SpatialResult<()>
pub fn rebuild_radius_grid( &mut self, runtime: &WgpuRuntime, radius: f32, ) -> SpatialResult<()>
Rebuilds the sparse radius grid from retained positions.
Sourcepub fn estimate_normals(
&mut self,
runtime: &WgpuRuntime,
radius: f32,
) -> SpatialResult<()>
pub fn estimate_normals( &mut self, runtime: &WgpuRuntime, radius: f32, ) -> SpatialResult<()>
Estimates normals using a cached matching grid or rebuilds it first.
Sourcepub fn reduce_attributes(
&mut self,
runtime: &WgpuRuntime,
aggregation: AoSoAAttributeAggregation,
) -> SpatialResult<AoSoAAttributeReduction>
pub fn reduce_attributes( &mut self, runtime: &WgpuRuntime, aggregation: AoSoAAttributeAggregation, ) -> SpatialResult<AoSoAAttributeReduction>
Reduces attached interleaved attributes using retained voxel segments.
Sourcepub fn readback_positions(
&mut self,
runtime: &WgpuRuntime,
) -> SpatialResult<Vec<[f32; 3]>>
pub fn readback_positions( &mut self, runtime: &WgpuRuntime, ) -> SpatialResult<Vec<[f32; 3]>>
Explicitly reads interleaved positions back to CPU memory.
Sourcepub fn recycle(self, runtime: &WgpuRuntime) -> SpatialResult<()>
pub fn recycle(self, runtime: &WgpuRuntime) -> SpatialResult<()>
Recycles pooled frame buffers after validating the runtime device.