1pub mod error;
26pub use error::HisabError;
27
28#[cfg(feature = "ai")]
29pub use error::DaimonError;
30
31pub type Result<T> = std::result::Result<T, HisabError>;
33
34pub const EPSILON_F32: f32 = 1e-7;
36
37pub const EPSILON_F64: f64 = 1e-12;
39
40#[cfg(feature = "transforms")]
41pub mod transforms;
42
43#[cfg(feature = "geo")]
44pub mod geo;
45
46#[cfg(feature = "calc")]
47pub mod calc;
48
49#[cfg(feature = "num")]
50pub mod num;
51
52#[cfg(feature = "autodiff")]
53pub mod autodiff;
54
55#[cfg(feature = "interval")]
56pub mod interval;
57
58#[cfg(feature = "symbolic")]
59pub mod symbolic;
60
61#[cfg(feature = "tensor")]
62pub mod tensor;
63
64#[cfg(feature = "parallel")]
65pub mod parallel;
66
67#[cfg(feature = "ai")]
68pub mod ai;
69
70#[cfg(feature = "logging")]
71pub mod logging;
72
73#[cfg(feature = "transforms")]
78pub use transforms::{EulerOrder, Lorentz, Su2, Transform2D, Transform3D, U1};
79
80#[cfg(feature = "transforms")]
82pub use glam::{Mat3, Mat4, Quat, Vec2, Vec3, Vec4};
83
84#[cfg(feature = "transforms")]
86pub use glam::{DMat3, DMat4, DQuat, DVec2, DVec3, DVec4};
87
88#[cfg(feature = "geo")]
89pub use geo::{
90 Aabb, Bvh, Capsule, ContactConstraint, ContactEdge, ConvexDecomposition, ConvexHull3D,
91 ConvexPolygon, ConvexSupport, ConvexSupport3D, Frustum, HalfEdge, HalfEdgeMesh, Island, KdTree,
92 Line, Obb, Octree, Penetration3D, Plane, Quadtree, Ray, Rect, Segment, SpatialHash, Sphere,
93 TriMesh, Triangle,
94};
95
96#[cfg(feature = "num")]
97pub use num::{
98 Complex, ComplexMatrix, ComplexSvd, CsrMatrix, DenseMatrix, EigenDecomposition, HermitianEigen,
99 OptResult, Pcg32, Svd,
100};
101
102#[cfg(feature = "autodiff")]
103pub use autodiff::{Dual, Tape, Var};
104
105#[cfg(feature = "interval")]
106pub use interval::Interval;
107
108#[cfg(feature = "symbolic")]
109pub use symbolic::{Expr, ExprValue, Pattern, RewriteRule, SolveOptions};
110
111#[cfg(feature = "tensor")]
112pub use tensor::{
113 AntisymmetricTensor, IndexVariance, IndexedTensor, SparseTensor, SymmetricTensor, Tensor,
114 TensorIndex,
115};
116
117#[cfg(feature = "ai")]
118pub use ai::DaimonClient;
119
120#[cfg(test)]
125mod assert_traits {
126 fn _assert_send_sync<T: Send + Sync>() {}
127
128 #[test]
129 fn public_types_are_send_sync() {
130 #[cfg(feature = "transforms")]
131 {
132 _assert_send_sync::<super::Transform2D>();
133 _assert_send_sync::<super::Transform3D>();
134 _assert_send_sync::<super::U1>();
135 _assert_send_sync::<super::Su2>();
136 _assert_send_sync::<super::Lorentz>();
137 }
138
139 #[cfg(feature = "geo")]
140 {
141 _assert_send_sync::<super::Ray>();
142 _assert_send_sync::<super::Aabb>();
143 _assert_send_sync::<super::Sphere>();
144 _assert_send_sync::<super::Plane>();
145 _assert_send_sync::<super::Triangle>();
146 _assert_send_sync::<super::Line>();
147 _assert_send_sync::<super::Segment>();
148 _assert_send_sync::<super::Frustum>();
149 _assert_send_sync::<super::Obb>();
150 _assert_send_sync::<super::Capsule>();
151 _assert_send_sync::<super::Penetration3D>();
152 _assert_send_sync::<super::geo::cga::Multivector>();
153 }
154
155 #[cfg(feature = "num")]
156 {
157 _assert_send_sync::<super::Complex>();
158 _assert_send_sync::<super::ComplexMatrix>();
159 _assert_send_sync::<super::ComplexSvd>();
160 _assert_send_sync::<super::HermitianEigen>();
161 }
162
163 #[cfg(feature = "tensor")]
164 {
165 _assert_send_sync::<super::IndexedTensor>();
166 _assert_send_sync::<super::TensorIndex>();
167 _assert_send_sync::<super::SymmetricTensor>();
168 _assert_send_sync::<super::AntisymmetricTensor>();
169 _assert_send_sync::<super::SparseTensor>();
170 }
171 }
172}