use-simplex 0.0.6

Simplex primitives for the RustUse geometry workspace
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented1 out of 9 items with examples
  • Size
  • Source code size: 5.54 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 367.74 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-geometry
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-simplex

Simplex primitives for the RustUse geometry workspace.

use-simplex provides general simplex descriptors plus a small Tetrahedron type. It does not duplicate triangle logic from use-triangle.

Example

use use_simplex::{Simplex, Tetrahedron};
use use_vector::Vector3;

let simplex = Simplex::new(3).expect("valid dimension");
let tetrahedron = Tetrahedron::new([
    Vector3::new(0.0, 0.0, 0.0),
    Vector3::new(1.0, 0.0, 0.0),
    Vector3::new(0.0, 1.0, 0.0),
    Vector3::new(0.0, 0.0, 1.0),
]);

assert_eq!(simplex.vertex_count(), 4);
assert_eq!(tetrahedron.vertex_count(), 4);