1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! This is a port of the excellent [GLSL_Pathtracer](https://github.com/knightcrawler25/GLSL-PathTracer) to Rust utilizing an abstracted, trait based backend.
//! Perfect for rendering procedural content.
//!

pub type I = i32;
pub type F = f32;

const PI : F = std::f32::consts::PI;
const INV_PI : F = 1.0 / std::f32::consts::PI;
const TWO_PI : F = std::f32::consts::PI * 2.0;


pub mod fx;
pub mod math;
pub mod tracer;
pub mod camera;
pub mod scene;
pub mod material;
pub mod globals;
pub mod buffer;
pub mod light;
pub mod ray;

pub mod prelude {

    pub use crate::I;
    pub use crate::F;

    pub use crate::fx::F2;
    pub use crate::fx::F3;
    pub use crate::fx::B3;
    pub use crate::math::*;

    pub use crate::camera::Camera3D;
    pub use crate::camera::pinhole::Pinhole;

    pub use crate::light::AnalyticalLight;

    pub use crate::material::*;
    pub use crate::globals::*;

    pub use crate::buffer::ColorBuffer;

    pub use crate::scene::Scene;
    pub use crate::tracer::Tracer;

    pub use crate::ray::Ray;
}