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: - [x] LineString, a sequence of points, aka Polyline. - [x] Self intersection tests in 2d - [x] Line, a finite two-point struct (no rays) - [x] [Ramer–Douglas-Peucker](https://en.wikipedia.org/wiki/Ramer–Douglas–Peuckeralgorithm) and - [x] [Visvalingam-Whyatt](https://en.wikipedia.org/wiki/Visvalingam–Whyattalgorithm) line simplification algorithms. - [x] Aabb axis aligned bounding box - [ ] Polynomial/spline/bezier curves
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:
cargo
linestring = {version = "^0.0.6", features = ["impl-cgmath"]}
Same thing for the other supported 2d/3d libraries:
cargo
linestring = {version = "^0.0.6", features = ["impl-nalgebra"]}
cargo
linestring = {version = "^0.0.6", features = ["impl-mint"]}
cargo
linestring = {version = "^0.0.6", features = ["impl-vec"]}
Run the line simplification example with :
fish
cargo run --example fltk_gui --features impl-cgmath