bevy_gaussian_splatting 2.4.2

bevy gaussian splatting render pipeline plugin
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::io::Write;

use crate::{
    GaussianCloud,
    io::codec::GaussianCloudCodec,
};


pub fn write_gaussian_cloud_to_file(
    cloud: &GaussianCloud,
    path: &str,
) {
    let gcloud_file = std::fs::File::create(path).expect("failed to create file");
    let mut gcloud_writer = std::io::BufWriter::new(gcloud_file);

    let data = cloud.encode();
    gcloud_writer.write_all(data.as_slice()).expect("failed to write to gcloud file");
}