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
use crate::wrappers::{*, structs::*, unreal::*};
use super::*;

pub struct AirControlComponentWrapper(pub usize);
impl_object!(AirControlComponentWrapper);

impl AirControlComponent for AirControlComponentWrapper {}
impl CarComponent for AirControlComponentWrapper {}
impl Actor for AirControlComponentWrapper {}

pub trait AirControlComponent : CarComponent {
    fn get_air_torque(&self) -> Rotator {
        unsafe {
            let mut result = Rotator::new();
            let result_ptr: *mut Rotator = &mut result as *mut Rotator;
            CarComponent_AirControl_TA_Get_AirTorque(self.addr(), result_ptr);
            result
        }
    }
    fn get_air_damping(&self) -> Rotator {
        unsafe {
            let mut result = Rotator::new();
            let result_ptr: *mut Rotator = &mut result as *mut Rotator;
            CarComponent_AirControl_TA_Get_AirDamping(self.addr(), result_ptr);
            result
        }
    }
    fn get_throttle_force(&self) -> f32 {
        unsafe {
            CarComponent_AirControl_TA_Get_ThrottleForce(self.addr())
        }
    }
    fn get_air_control_sensitivity(&self) -> f32 {
        unsafe {
            CarComponent_AirControl_TA_Get_AirControlSensitivity(self.addr())
        }
    }
    fn apply_forces(&self, active_time: f32) {
        unsafe {
            CarComponent_AirControl_TA_ApplyForces(self.addr(), active_time);
        }
    }
    fn on_created(&self) {
        unsafe {
            CarComponent_AirControl_TA_OnCreated(self.addr());
        }
    }

}

extern "C" {
    fn CarComponent_AirControl_TA_Get_AirTorque(obj: usize, result: *mut Rotator);
    fn AirControlComponentWrapper_SetAirTorque(obj: usize, new_val: *mut Rotator);
    fn CarComponent_AirControl_TA_Get_AirDamping(obj: usize, result: *mut Rotator);
    fn AirControlComponentWrapper_SetAirDamping(obj: usize, new_val: *mut Rotator);
    fn CarComponent_AirControl_TA_Get_ThrottleForce(obj: usize) -> f32;
    fn AirControlComponentWrapper_SetThrottleForce(obj: usize, new_val: f32);
    fn CarComponent_AirControl_TA_Get_AirControlSensitivity(obj: usize) -> f32;
    fn AirControlComponentWrapper_SetAirControlSensitivity(obj: usize, new_val: f32);
    fn CarComponent_AirControl_TA_ApplyForces(obj: usize, ActiveTime: f32);
    fn CarComponent_AirControl_TA_OnCreated(obj: usize);

}