rust_pathtracer/
lib.rs

1//! This is a port of the excellent [GLSL_Pathtracer](https://github.com/knightcrawler25/GLSL-PathTracer) to Rust utilizing an abstracted, trait based backend.
2//! Perfect for rendering procedural content.
3//!
4
5pub type I = i32;
6pub type F = f32;
7
8const PI : F = std::f32::consts::PI;
9const INV_PI : F = 1.0 / std::f32::consts::PI;
10const TWO_PI : F = std::f32::consts::PI * 2.0;
11
12
13pub mod fx;
14pub mod math;
15pub mod tracer;
16pub mod camera;
17pub mod scene;
18pub mod material;
19pub mod globals;
20pub mod buffer;
21pub mod light;
22pub mod ray;
23
24pub mod prelude {
25
26    pub use crate::I;
27    pub use crate::F;
28
29    pub use crate::fx::F2;
30    pub use crate::fx::F3;
31    pub use crate::fx::B3;
32    pub use crate::math::*;
33
34    pub use crate::camera::Camera3D;
35    pub use crate::camera::pinhole::Pinhole;
36
37    pub use crate::light::AnalyticalLight;
38
39    pub use crate::material::*;
40    pub use crate::globals::*;
41
42    pub use crate::buffer::ColorBuffer;
43
44    pub use crate::scene::Scene;
45    pub use crate::tracer::Tracer;
46
47    pub use crate::ray::Ray;
48}