1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
use std::os::raw::{c_float, c_uint};

// Reexport submodules
pub use self::color3::*;
pub use self::color4::*;
pub use self::matrix3::*;
pub use self::matrix4::*;
pub use self::quaternion::*;
pub use self::string::*;
pub use self::vector2::*;
pub use self::vector3::*;

mod color3;
mod color4;
mod matrix3;
mod matrix4;
mod quaternion;
mod string;
mod vector2;
mod vector3;

#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct AiPlane {
    pub a: c_float,
    pub b: c_float,
    pub c: c_float,
    pub d: c_float,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct AiRay {
    pub pos: AiVector3D,
    pub dir: AiVector3D,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AiReturn {
    Success = 0,
    Failure = 1,
    OutOfMemory = 3,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AiOrigin {
    Set = 0,
    Cur = 1,
    End = 2,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum AiDefaultLogStream {
    File = 1,
    StdOut = 2,
    StdErr = 4,
    Debugger = 8,
}

#[repr(C)]
#[derive(Clone, Copy, Debug, Default)]
pub struct AiMemoryInfo {
    pub textures: c_uint,
    pub materials: c_uint,
    pub meshes: c_uint,
    pub nodes: c_uint,
    pub animations: c_uint,
    pub cameras: c_uint,
    pub lights: c_uint,
    pub total: c_uint,
}