Skip to main content

engage/generated/root_motion/final_ik/
lookatcontroller.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "root_motion-final_ik-lookatcontroller-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        system::object::{IObject, Object},
10        unity_engine::{
11            behaviour::{Behaviour, IBehaviour},
12            component::{Component, IComponent},
13            monobehaviour::{IMonoBehaviour, MonoBehaviour},
14            object_2::{IObject_2, Object_2},
15        },
16    };
17
18    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/final_ik/lookatcontroller/LookAtController.md"))]
19    #[::unity::class(namespace = "RootMotion.FinalIK", name = "LookAtController")]
20    #[parent(crate::unity_engine::monobehaviour::MonoBehaviour)]
21    pub struct LookAtController {
22        #[offset(24)]
23        #[rename(name = "ik")]
24        pub ik: crate::root_motion::final_ik::lookatik::LookAtIK,
25        #[offset(32)]
26        #[rename(name = "target")]
27        pub target: crate::unity_engine::transform::Transform,
28        #[offset(40)]
29        #[rename(name = "weight")]
30        pub weight: f32,
31        #[offset(44)]
32        #[rename(name = "offset")]
33        pub offset: crate::unity_engine::vector3::Vector3,
34        #[offset(56)]
35        #[rename(name = "targetSwitchSmoothTime")]
36        pub target_switch_smooth_time: f32,
37        #[offset(60)]
38        #[rename(name = "weightSmoothTime")]
39        pub weight_smooth_time: f32,
40        #[offset(64)]
41        #[rename(name = "smoothTurnTowardsTarget")]
42        pub smooth_turn_towards_target: bool,
43        #[offset(68)]
44        #[rename(name = "maxRadiansDelta")]
45        pub max_radians_delta: f32,
46        #[offset(72)]
47        #[rename(name = "maxMagnitudeDelta")]
48        pub max_magnitude_delta: f32,
49        #[offset(76)]
50        #[rename(name = "slerpSpeed")]
51        pub slerp_speed: f32,
52        #[offset(80)]
53        #[rename(name = "pivotOffsetFromRoot")]
54        pub pivot_offset_from_root: crate::unity_engine::vector3::Vector3,
55        #[offset(92)]
56        #[rename(name = "minDistance")]
57        pub min_distance: f32,
58        #[offset(96)]
59        #[rename(name = "maxRootAngle")]
60        pub max_root_angle: f32,
61        #[offset(104)]
62        #[rename(name = "lastTarget")]
63        pub last_target: crate::unity_engine::transform::Transform,
64        #[offset(112)]
65        #[rename(name = "switchWeight")]
66        pub switch_weight: f32,
67        #[offset(116)]
68        #[rename(name = "switchWeightV")]
69        pub switch_weight_v: f32,
70        #[offset(120)]
71        #[rename(name = "weightV")]
72        pub weight_v: f32,
73        #[offset(124)]
74        #[rename(name = "lastPosition")]
75        pub last_position: crate::unity_engine::vector3::Vector3,
76        #[offset(136)]
77        #[rename(name = "dir")]
78        pub dir: crate::unity_engine::vector3::Vector3,
79        #[offset(148)]
80        #[rename(name = "lastSmoothTowardsTarget")]
81        pub last_smooth_towards_target: bool,
82    }
83}
84
85#[cfg(feature = "root_motion-final_ik-lookatcontroller-types")]
86pub use __types::*;
87
88#[cfg(feature = "root_motion-final_ik-lookatcontroller")]
89pub trait ILookAtControllerMethods: ILookAtController {
90    #[doc = "`Start()` overload"]
91    fn start(self) -> () {
92        unsafe {
93            let __receiver = <LookAtController as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
94            ::unity::il2cpp_call!((::unity::module_base()+0x1befb60usize)as*mut u8,();
95(LookAtController)__receiver)
96        }
97    }
98    #[doc = "`LateUpdate()` overload"]
99    fn late_update(self) -> () {
100        unsafe {
101            let __receiver = <LookAtController as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
102            ::unity::il2cpp_call!((::unity::module_base()+0x1befca0usize)as*mut u8,();
103(LookAtController)__receiver)
104        }
105    }
106    #[doc = "`get_pivot()` overload"]
107    fn get_pivot(self) -> crate::unity_engine::vector3::Vector3 {
108        unsafe {
109            let __receiver = <LookAtController as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
110            ::unity::il2cpp_call!((::unity::module_base()+0x1befc20usize)as*mut u8,crate::unity_engine::vector3::Vector3;
111(LookAtController)__receiver)
112        }
113    }
114    #[doc = "`ApplyMinDistance()` overload"]
115    fn apply_min_distance(self) -> () {
116        unsafe {
117            let __receiver = <LookAtController as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
118            ::unity::il2cpp_call!((::unity::module_base()+0x1bf02e0usize)as*mut u8,();
119(LookAtController)__receiver)
120        }
121    }
122    #[doc = "`RootRotation()` overload"]
123    fn root_rotation(self) -> () {
124        unsafe {
125            let __receiver = <LookAtController as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
126            ::unity::il2cpp_call!((::unity::module_base()+0x1bf03f0usize)as*mut u8,();
127(LookAtController)__receiver)
128        }
129    }
130    #[doc = "`.ctor()` overload"]
131    fn ctor(self) -> () {
132        unsafe {
133            let __receiver = <LookAtController as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
134            ::unity::il2cpp_call!((::unity::module_base()+0x1bf0600usize)as*mut u8,();
135(LookAtController)__receiver)
136        }
137    }
138}
139
140#[cfg(feature = "root_motion-final_ik-lookatcontroller")]
141impl<__T: ILookAtController> ILookAtControllerMethods for __T {}
142
143#[cfg(feature = "root_motion-final_ik-lookatcontroller")]
144impl LookAtController {
145    pub fn start_method_info() -> &'static ::unity::il2cpp::MethodInfo {
146        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
147    }
148
149    pub fn late_update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
150        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
151    }
152
153    pub fn get_pivot_method_info() -> &'static ::unity::il2cpp::MethodInfo {
154        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
155    }
156
157    pub fn apply_min_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
158        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
159    }
160
161    pub fn root_rotation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
162        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
163    }
164
165    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
166        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
167    }
168}
169
170#[cfg(feature = "root_motion-final_ik-lookatcontroller")]
171impl LookAtController {
172    #[doc = "`.ctor()` — no args"]
173    pub fn new() -> Self {
174        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
175            panic!(
176                "{}
177::{}
178 failed to instantiate",
179                ::core::stringify!(LookAtController),
180                ::core::stringify!(new),
181            )
182        });
183        <Self as ILookAtControllerMethods>::ctor(this);
184        this
185    }
186}
187
188#[cfg(feature = "root_motion-final_ik-lookatcontroller")]
189#[doc(hidden)]
190pub mod prelude {
191    pub use super::{ILookAtController, ILookAtControllerMethods, LookAtController};
192    #[cfg(feature = "system-object")]
193    pub use crate::system::object::IObjectMethods;
194    #[cfg(feature = "unity_engine-behaviour")]
195    pub use crate::unity_engine::behaviour::IBehaviourMethods;
196    #[cfg(feature = "unity_engine-component")]
197    pub use crate::unity_engine::component::IComponentMethods;
198    #[cfg(feature = "unity_engine-monobehaviour")]
199    pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
200    #[cfg(feature = "unity_engine-object_2")]
201    pub use crate::unity_engine::object_2::IObject_2Methods;
202    pub use crate::{
203        system::object::IObject,
204        unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
205    };
206}