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//! - `Dir` enforces its unit-length invariant in the type, not by convention.
9//! - `Trsf` carries a **form classification** (identity / translation / rotation /
10//!   scale / …), used to short-circuit transform application. Skipping it costs
11//!   real performance across the whole kernel.
12
13pub mod bounds;
14pub mod bspline;
15pub mod conic;
16pub mod construct2d;
17pub mod direction;
18pub mod elementary;
19pub mod frame;
20pub mod integrate;
21pub mod interval;
22pub mod knots;
23pub mod matrix;
24pub mod optimize;
25pub mod point;
26pub mod quadric;
27pub mod quaternion;
28pub mod solve;
29pub mod sparse;
30pub mod transform;
31pub mod vector;
32
33pub use bounds::Aabb;
34pub use bspline::{Blend, ControlGrid, Weighted};
35pub use conic::{Circle, Circle2, Ellipse, Ellipse2, Hyperbola, Hyperbola2, Parabola, Parabola2};
36pub use construct2d::{
37    Bisector2, Placement, TangentCircle, Target2, bisector, circles_of_radius_tangent_to_two,
38    circles_tangent_to_three, lines_tangent_to_two_circles,
39};
40pub use direction::{Direction, Direction2};
41pub use elementary::{CurvePoint, SurfacePoint};
42pub use frame::{Axis, Axis2, Frame, Frame2, Handedness};
43pub use integrate::{gauss_kronrod, gauss_legendre, gauss_legendre_rule, integrate, integrate_2d};
44pub use interval::Interval;
45pub use knots::{BasisValues, KnotVector};
46pub use matrix::{Matrix2, Matrix3};
47pub use optimize::{Minimum, global_minimum, minimize_local, swarm_minimum};
48pub use point::{Point, Point2};
49pub use quadric::{Cone, Cylinder, Plane, Sphere, Torus, TorusKind};
50pub use quaternion::Quaternion;
51pub use solve::{Convergence, Criteria, Solution, SystemSolution};
52pub use sparse::{SparseMatrix, least_squares_cgnr};
53pub use transform::{GeneralTransform, Transform, Transform2, TransformKind};
54pub use vector::{Vector, Vector2};