microcad_core/
lib.rs

1// Copyright © 2024-2025 The µcad authors <info@ucad.xyz>
2// SPDX-License-Identifier: AGPL-3.0-or-later
3
4//! µcad core
5
6mod boolean_op;
7
8pub mod bounds;
9pub mod color;
10pub mod core_error;
11pub mod geo2d;
12#[cfg(feature = "geo3d")]
13pub mod geo3d;
14pub mod render;
15pub mod theme;
16pub mod traits;
17pub mod triangle;
18
19/// Primitive integer type
20pub type Integer = i64;
21/// Primitive floating point type
22pub type Scalar = f64;
23/// 2D vector type
24pub type Vec2 = cgmath::Vector2<Scalar>;
25/// 3D vector type
26pub type Vec3 = cgmath::Vector3<Scalar>;
27/// 4D vector type
28pub type Vec4 = cgmath::Vector4<Scalar>;
29/// 2D matrix type
30pub type Mat2 = cgmath::Matrix2<Scalar>;
31/// 3D matrix type
32pub type Mat3 = cgmath::Matrix3<Scalar>;
33/// 4D matrix type
34pub type Mat4 = cgmath::Matrix4<Scalar>;
35/// Primitive angle type
36pub type Angle = cgmath::Rad<Scalar>;
37
38pub use boolean_op::BooleanOp;
39pub use bounds::*;
40pub use color::*;
41pub use core_error::*;
42pub use geo2d::*;
43pub use geo3d::*;
44pub use render::*;
45pub use triangle::*;