beevee: add library to workspace

This is designed to be the new BVH for the raytracer.
master
Bruno BELANYI 3 years ago
parent 01d2c2d973
commit 9c56134c67
  1. 1
      Cargo.toml
  2. 10
      beevee/Cargo.toml
  3. 5
      beevee/src/aabb/bounding_box.rs
  4. 4
      beevee/src/aabb/mod.rs
  5. 4
      beevee/src/bvh/mod.rs
  6. 2
      beevee/src/bvh/tree.rs
  7. 25
      beevee/src/lib.rs
  8. 5
      beevee/src/ray.rs

@ -1,5 +1,6 @@
[workspace]
members = [
"beevee",
"pathtracer",
]

@ -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"

@ -0,0 +1,5 @@
//! An Axis-Alighned Bounding Box.
/// An axis-aligned bounding box.
#[derive(Copy, Clone, Debug, PartialEq)]
pub struct AABB {}

@ -0,0 +1,4 @@
//! The module relating to Axis-Aligned Bounding Boxes.
mod bounding_box;
pub use bounding_box::*;

@ -0,0 +1,4 @@
//! The Boudning Volume Hiearchy
mod tree;
pub use tree::*;

@ -0,0 +1,2 @@
/// The BVH containing all the objects.
pub struct BVH {}

@ -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;

@ -0,0 +1,5 @@
/// The [`Ray`] to intersect with the [`BVH`].
///
/// [`BVH`]: ../bvh/struct.BVH.html
/// [`Ray`]: struct.Ray.html
pub struct Ray {}
Loading…
Cancel
Save