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 color;
9pub mod core_error;
10pub mod geo2d;
11#[cfg(feature = "geo3d")]
12pub mod geo3d;
13pub mod render_resolution;
14pub mod theme;
15pub mod traits;
16
17/// Primitive integer type
18pub type Integer = i64;
19/// Primitive floating point type
20pub type Scalar = f64;
21/// 2D vector type
22pub type Vec2 = cgmath::Vector2<Scalar>;
23/// 3D vector type
24pub type Vec3 = cgmath::Vector3<Scalar>;
25/// 4D vector type
26pub type Vec4 = cgmath::Vector4<Scalar>;
27/// 2D matrix type
28pub type Mat2 = cgmath::Matrix2<Scalar>;
29/// 3D matrix type
30pub type Mat3 = cgmath::Matrix3<Scalar>;
31/// 4D matrix type
32pub type Mat4 = cgmath::Matrix4<Scalar>;
33/// Primitive angle type
34pub type Angle = cgmath::Rad<Scalar>;
35
36pub use boolean_op::BooleanOp;
37pub use color::*;
38pub use core_error::*;
39pub use geo2d::*;
40pub use geo3d::*;
41pub use render_resolution::*;