pbrt4

Crates.iopbrt4
lib.rspbrt4
version0.2.0
sourcesrc
created_at2023-05-21 23:03:18.80713
updated_at2023-05-23 04:09:37.271857
descriptionLightweight and fast PBRT v4 file parser
homepage
repositoryhttps://github.com/mxpv/pbrt4
max_upload_size
id870180
size363,069
Maksym Pavlenko (mxpv)

documentation

README

pbrt4

CI Crates.io docs.rs Crates.io dependency status

A Rust crate to load pbrt-v4 files.

The scene description files used by pbrt are plain text files. The file format was designed so that it would be both easy to parse and easy for applications to generate from their own internal representations of scenes.

A pbrt scene file consists of a series of statements; different statements specify the geometry and light sources in the scene and set overall rendering parameters (such as which light transport algorithm to use or the image resolution).

Resources

Getting started

Add the following to your project's Cargo.toml:

pbrt4 = "0.1.0"

Reading a pbrt file is as easy as:

let scene = Scene::from_file("file.pbrt")?;

for shape in scene.shapes {
    println!("{:?}", shape)
}

Please refer to examples for more examples how to use the crate.

Commit count: 31

cargo fmt