beevee: add library to workspace
This is designed to be the new BVH for the raytracer.
This commit is contained in:
parent
01d2c2d973
commit
9c56134c67
|
@ -1,5 +1,6 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
||||||
members = [
|
members = [
|
||||||
|
"beevee",
|
||||||
"pathtracer",
|
"pathtracer",
|
||||||
]
|
]
|
||||||
|
|
10
beevee/Cargo.toml
Normal file
10
beevee/Cargo.toml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[package]
|
||||||
|
name = "beevee"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["Bruno BELANYI <brunobelanyi@gmail.com>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
nalgebra = "0.20"
|
5
beevee/src/aabb/bounding_box.rs
Normal file
5
beevee/src/aabb/bounding_box.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
//! An Axis-Alighned Bounding Box.
|
||||||
|
|
||||||
|
/// An axis-aligned bounding box.
|
||||||
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
|
pub struct AABB {}
|
4
beevee/src/aabb/mod.rs
Normal file
4
beevee/src/aabb/mod.rs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
//! The module relating to Axis-Aligned Bounding Boxes.
|
||||||
|
|
||||||
|
mod bounding_box;
|
||||||
|
pub use bounding_box::*;
|
4
beevee/src/bvh/mod.rs
Normal file
4
beevee/src/bvh/mod.rs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
//! The Boudning Volume Hiearchy
|
||||||
|
|
||||||
|
mod tree;
|
||||||
|
pub use tree::*;
|
2
beevee/src/bvh/tree.rs
Normal file
2
beevee/src/bvh/tree.rs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/// The BVH containing all the objects.
|
||||||
|
pub struct BVH {}
|
25
beevee/src/lib.rs
Normal file
25
beevee/src/lib.rs
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#![warn(missing_docs)]
|
||||||
|
|
||||||
|
//! A Bounding Volume Hierarchy crate for use with ray-tracing.
|
||||||
|
|
||||||
|
/// The point to describe the [`AABB`]'s corners.
|
||||||
|
///
|
||||||
|
/// [`AABB`]: aabb/struct.AABB.html
|
||||||
|
pub type Point = nalgebra::Point3<f32>;
|
||||||
|
|
||||||
|
/// The Vector to describe the [`Ray`]'s direction.
|
||||||
|
///
|
||||||
|
/// [`Ray`]: ray/struct.Ray.html
|
||||||
|
pub type Vector = nalgebra::Vector3<f32>;
|
||||||
|
|
||||||
|
/// The module relating to Axis-Aligned Bouding Boxes.
|
||||||
|
pub mod aabb;
|
||||||
|
|
||||||
|
/// The module relating to Bouding Volume Hiearchy
|
||||||
|
pub mod bvh;
|
||||||
|
|
||||||
|
/// Module defining a [`Ray`] structure to intersect with the [`BVH`]
|
||||||
|
///
|
||||||
|
/// [`BVH`]: ../bvh/struct.BVH.html
|
||||||
|
/// [`Ray`]: struct.Ray.html
|
||||||
|
pub mod ray;
|
5
beevee/src/ray.rs
Normal file
5
beevee/src/ray.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
/// The [`Ray`] to intersect with the [`BVH`].
|
||||||
|
///
|
||||||
|
/// [`BVH`]: ../bvh/struct.BVH.html
|
||||||
|
/// [`Ray`]: struct.Ray.html
|
||||||
|
pub struct Ray {}
|
Loading…
Reference in a new issue