thanatos 0.1.0

CSG geometries in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use bbox;
use nalgebra;

// some local types
pub type BoundingBox = bbox::BoundingBox<f64>;
pub type Point = nalgebra::Point3<f64>;
pub type Widths = nalgebra::Point3<f64>;

// base trait for all primitives
pub trait GeometricPrimitive {
  fn bounding_box(&self) -> BoundingBox;
  fn sdf(&self, v: &Point) -> f64;
}