Skip to content

A library for decoding Cesium quantized-mesh-1.0 terrain

License

Notifications You must be signed in to change notification settings

catnuko/quantized-mesh-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quantized-mesh-decoder

A Rust library for decoding Cesium quantized-mesh-1.0 terrain

quantized-mesh-decoder = "0.1.0"
use quantized_mesh_decoder::{from_reader,QuantizedMeshTerrainData};
use std::{path::Path, fs::File};
pub fn from_file(path: &'static str) -> QuantizedMeshTerrainData {
    let path = Path::new(path);
    let file = match File::open(&path) {
        Err(why) => panic!("couldn't open {:?}", why),
        Ok(file) => file,
    };
    match from_reader(file) {
        Ok(terrain) => {
            return terrain;
        }
        Err(error) => {
            panic!("error {:?}", error);
        }
    }
}
let terrain_data = from_file("assets/tile-opentin.terrain");

About

A library for decoding Cesium quantized-mesh-1.0 terrain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages