Skip to main content

ogeom_math/
lib.rs

1//! Value-semantics geometric primitives and the numerical machinery under them.
2//!
3//! *Elsewhere:* the `gp` primitives, the B-spline basis libraries, elementary
4//! curve/surface parameterization, and the solver half of a `math` package.
5//!
6//! Two things here are load-bearing and easy to get wrong:
7//!
8//! - `Direction` enforces its unit-length invariant in the type, not by
9//!   convention.
10//! - `Transform` carries a **form classification** (identity / translation /
11//!   rotation / scale / …) that short-circuits transform application across the
12//!   whole kernel.
13
14pub mod bounds;
15pub mod bspline;
16pub mod conic;
17pub mod construct2d;
18pub mod direction;
19pub mod elementary;
20pub mod frame;
21pub mod integrate;
22pub mod interval;
23pub mod knots;
24pub mod matrix;
25pub mod optimize;
26pub mod point;
27pub mod quadric;
28pub mod quaternion;
29pub mod solve;
30pub mod sparse;
31pub mod transform;
32pub mod vector;
33
34pub use bounds::Aabb;
35pub use bspline::{Blend, ControlGrid, Weighted};
36pub use conic::{Circle, Circle2, Ellipse, Ellipse2, Hyperbola, Hyperbola2, Parabola, Parabola2};
37pub use construct2d::{
38    Bisector2, Placement, TangentCircle, Target2, bisector, circles_of_radius_tangent_to_two,
39    circles_tangent_to_three, lines_tangent_to_two_circles,
40};
41pub use direction::{Direction, Direction2};
42pub use elementary::{CurvePoint, SurfacePoint};
43pub use frame::{Axis, Axis2, Frame, Frame2, Handedness};
44pub use integrate::{
45    gauss_kronrod, gauss_kronrod_21_rule, gauss_legendre, gauss_legendre_rule, integrate,
46    integrate_2d,
47};
48pub use interval::Interval;
49pub use knots::{BasisValues, KnotVector};
50pub use matrix::{Matrix2, Matrix3};
51pub use optimize::{Minimum, global_minimum, minimize_local, swarm_minimum};
52pub use point::{Point, Point2};
53pub use quadric::{Cone, Cylinder, Plane, Sphere, Torus, TorusKind};
54pub use quaternion::Quaternion;
55pub use solve::{Convergence, Criteria, Solution, SystemSolution};
56pub use sparse::{SparseMatrix, least_squares_cgnr};
57pub use transform::{GeneralTransform, Transform, Transform2, TransformKind};
58pub use vector::{Vector, Vector2};