Skip to main content

forge/mt/
datatype.rs

1#[cfg(feature = "allocator")]
2use core::fmt::Display;
3
4#[repr(u16)]
5#[derive(Debug, Clone, Copy)]
6pub enum MtType {
7    Undefined = 0,
8    Class,
9    ClassRef,
10    Bool,
11    U8,
12    U16,
13    U32,
14    U64,
15    S8,
16    S16,
17    S32,
18    S64,
19    F32,
20    F64,
21    String,
22    Color,
23    Point,
24    Size,
25    Rect,
26    Matrix,
27    Vector3,
28    Vector4,
29    Quaternion,
30    Property,
31    Event,
32    Group,
33    PageBegin,
34    PageEnd,
35    Event32,
36    Array,
37    PropertyList,
38    GroupEnd,
39    CString,
40    Time,
41    Float2,
42    Float3,
43    Float4,
44    Float3x3,
45    Float4x3,
46    Float4x4,
47    Easecurve,
48    Line,
49    LineSegment,
50    Ray,
51    Plane,
52    Sphere,
53    Capsule,
54    Aabb,
55    Obb,
56    Cylinder,
57    Triangle,
58    Cone,
59    Torus,
60    Ellipsoid,
61    Range,
62    RangeF,
63    RangeU16,
64    Hermitecurve,
65    EnumList,
66    Float3x4,
67    LineSegment4,
68    Aabb4,
69    Oscillator,
70    Variable,
71    Vector2,
72    Matrix33,
73    Rect3dXz,
74    Rect3d,
75    Rect3dCollision,
76    PlaneXz,
77    RayY,
78    PointF,
79    SizeF,
80    RectF,
81    Event64,
82    Count,
83
84    Custom = 0x80,
85}
86
87#[cfg(feature = "allocator")]
88impl Display for MtType {
89    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
90        write!(f, "{}", alloc::format!("{:?}", self).to_lowercase())
91    }
92}