linestring-0.0.5 has been yanked.
Work in progress
Anything in this API may will change without notice.
This crate will contain data structures and methods that deals with lines in 2d and 3d space.
There will be 3d and 2d implementations of:
- Line, a finite two-point struct (no rays)
- LineString, a sequence of points, aka Polyline.
- Ramer–Douglas-Peucker and Visvalingam-Whyatt line simplification algorithms.
- Aabb axis aligned bounding box
This will be implemented (feature gated) for cgmath, nalgebra and limited versions for mint and plain vector scalars (no transformations etc). More implementations could be added if required.
If you want to use this library in your cgmath project you add this to your Cargo.toml:
linestring = {version = "^0.0.5", features = ["impl-cgmath"]}
Same thing for the other supported 2d/3d libraries:
linestring = {version = "^0.0.5", features = ["impl-nalgebra"]}
linestring = {version = "^0.0.5", features = ["impl-mint"]}
linestring = {version = "^0.0.5", features = ["impl-vec"]}
Run the line simplification example with :
cargo run --example fltk_gui --features impl-cgmath
Todo
- Improve on error handling
- Benchmark and optimize (add smallvec to simplify?)
- optimize Ramer–Douglas-Peucker 2d & 3d
- Visvalingam-Whyatt 2d & 3d
- Figure out why workflows refuse to start