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 point;
25pub mod quadric;
26pub mod quaternion;
27pub mod solve;
28pub mod sparse;
29pub mod transform;
30pub mod vector;
31
32pub use bounds::Aabb;
33pub use bspline::{Blend, ControlGrid, Weighted};
34pub use conic::{Circle, Circle2, Ellipse, Ellipse2, Hyperbola, Hyperbola2, Parabola, Parabola2};
35pub use construct2d::{
36    Bisector2, Placement, TangentCircle, Target2, bisector, circles_of_radius_tangent_to_two,
37    circles_tangent_to_three, lines_tangent_to_two_circles,
38};
39pub use direction::{Direction, Direction2};
40pub use elementary::{CurvePoint, SurfacePoint};
41pub use frame::{Axis, Axis2, Frame, Frame2, Handedness};
42pub use integrate::{gauss_kronrod, gauss_legendre, gauss_legendre_rule, integrate, integrate_2d};
43pub use interval::Interval;
44pub use knots::{BasisValues, KnotVector};
45pub use matrix::{Matrix2, Matrix3};
46pub use point::{Point, Point2};
47pub use quadric::{Cone, Cylinder, Plane, Sphere, Torus, TorusKind};
48pub use quaternion::Quaternion;
49pub use solve::{Convergence, Criteria, Solution, SystemSolution};
50pub use sparse::{SparseMatrix, least_squares_cgnr};
51pub use transform::{GeneralTransform, Transform, Transform2, TransformKind};
52pub use vector::{Vector, Vector2};