Expand description
§ThreeCrate GPU
GPU-accelerated computing for 3D point cloud processing using WGPU.
This crate provides GPU-accelerated implementations of common 3D point cloud processing algorithms, leveraging the power of modern graphics hardware.
§Example Usage
use threecrate_gpu::{GpuContext, gpu_remove_statistical_outliers, gpu_radius_outlier_removal, gpu_voxel_grid_filter};
use threecrate_core::{PointCloud, Point3f};
async fn example() -> threecrate_core::Result<()> {
let gpu_context = GpuContext::new().await?;
let mut point_cloud = PointCloud::<Point3f>::new();
// ... populate point cloud
// Compute normals using GPU acceleration
let normals = gpu_context.compute_normals(&point_cloud.points, 10).await?;
// Filter outliers using GPU acceleration
let filtered = gpu_remove_statistical_outliers(&gpu_context, &point_cloud, 10, 1.0).await?;
// Remove isolated points using radius-based filtering
let filtered = gpu_radius_outlier_removal(&gpu_context, &point_cloud, 0.1, 5).await?;
// Downsample using voxel grid filtering
let downsampled = gpu_voxel_grid_filter(&gpu_context, &point_cloud, 0.05).await?;
Ok(())
}Re-exports§
pub use device::GpuContext;pub use filtering::gpu_remove_statistical_outliers;pub use filtering::gpu_radius_outlier_removal;pub use filtering::gpu_voxel_grid_filter;pub use normals::gpu_estimate_normals;pub use nearest_neighbor::gpu_find_k_nearest;pub use nearest_neighbor::gpu_find_k_nearest_batch;pub use nearest_neighbor::gpu_find_radius_neighbors;pub use icp::gpu_icp;pub use tsdf::gpu_tsdf_integrate;pub use tsdf::gpu_tsdf_extract_surface;pub use tsdf::create_tsdf_volume;pub use tsdf::TsdfVolume;pub use tsdf::TsdfVoxel;pub use tsdf::CameraIntrinsics;pub use tsdf::TsdfVolumeGpu;pub use renderer::PointCloudRenderer;pub use renderer::PointVertex;pub use renderer::RenderConfig;pub use renderer::RenderParams;pub use renderer::CameraUniform;pub use renderer::point_cloud_to_vertices;pub use renderer::point_cloud_to_vertices_colored;pub use renderer::colored_point_cloud_to_vertices;pub use mesh::MeshRenderer;pub use mesh::MeshVertex;pub use mesh::MeshCameraUniform;pub use mesh::PbrMaterial;pub use mesh::FlatMaterial;pub use mesh::MeshLightingParams;pub use mesh::MeshRenderConfig;pub use mesh::GpuMesh;pub use mesh::ShadingMode;pub use mesh::mesh_to_gpu_mesh;pub use utils::*;