├── .gitignore ├── .rustfmt.toml ├── .travis.yml ├── .vscode └── launch.json ├── Cargo.toml ├── LICENSE ├── README.md ├── examples └── reference.rs ├── images ├── smallpt-uml.dot ├── smallpt-uml.png └── smallpt.png └── src ├── bsdf.rs ├── camera.rs ├── hit.rs ├── lib.rs ├── material.rs ├── plane.rs ├── ray.rs ├── rectangle.rs ├── scene.rs ├── sphere.rs ├── triangle.rs └── vector.rs /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/.gitignore -------------------------------------------------------------------------------- /.rustfmt.toml: -------------------------------------------------------------------------------- 1 | hard_tabs = true -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/.travis.yml -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/.vscode/launch.json -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/README.md -------------------------------------------------------------------------------- /examples/reference.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/examples/reference.rs -------------------------------------------------------------------------------- /images/smallpt-uml.dot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/images/smallpt-uml.dot -------------------------------------------------------------------------------- /images/smallpt-uml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/images/smallpt-uml.png -------------------------------------------------------------------------------- /images/smallpt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/images/smallpt.png -------------------------------------------------------------------------------- /src/bsdf.rs: -------------------------------------------------------------------------------- 1 | #[derive(Copy, Clone)] 2 | pub enum BSDF { 3 | Diffuse, 4 | Mirror, 5 | Glass, 6 | } 7 | -------------------------------------------------------------------------------- /src/camera.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/camera.rs -------------------------------------------------------------------------------- /src/hit.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/hit.rs -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/lib.rs -------------------------------------------------------------------------------- /src/material.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/material.rs -------------------------------------------------------------------------------- /src/plane.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/plane.rs -------------------------------------------------------------------------------- /src/ray.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/ray.rs -------------------------------------------------------------------------------- /src/rectangle.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/rectangle.rs -------------------------------------------------------------------------------- /src/scene.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/scene.rs -------------------------------------------------------------------------------- /src/sphere.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/sphere.rs -------------------------------------------------------------------------------- /src/triangle.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/triangle.rs -------------------------------------------------------------------------------- /src/vector.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zigguratvertigo/smallpt-rs/HEAD/src/vector.rs --------------------------------------------------------------------------------