engage/generated/root_motion/
humanoidbaker.rs1#[cfg(feature = "root_motion-humanoidbaker-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 root_motion::baker::{Baker, IBaker},
10 system::object::{IObject, Object},
11 unity_engine::{
12 behaviour::{Behaviour, IBehaviour},
13 component::{Component, IComponent},
14 monobehaviour::{IMonoBehaviour, MonoBehaviour},
15 object_2::{IObject_2, Object_2},
16 },
17 };
18
19 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/humanoidbaker/HumanoidBaker.md"))]
20 #[::unity::class(namespace = "RootMotion", name = "HumanoidBaker")]
21 #[parent(crate::root_motion::baker::Baker)]
22 pub struct HumanoidBaker {
23 #[offset(116)]
24 #[rename(name = "bakeHandIK")]
25 pub bake_hand_ik: bool,
26 #[offset(120)]
27 #[rename(name = "IKKeyReductionError")]
28 pub ik_key_reduction_error: f32,
29 #[offset(124)]
30 #[rename(name = "muscleFrameRateDiv")]
31 pub muscle_frame_rate_div: i32,
32 #[offset(128)]
33 #[rename(name = "bakerMuscles")]
34 pub baker_muscles: ::unity::Array<crate::root_motion::bakermuscle::BakerMuscle>,
35 #[offset(136)]
36 #[rename(name = "rootQT")]
37 pub root_qt: crate::root_motion::bakerhumanoidqt::BakerHumanoidQT,
38 #[offset(144)]
39 #[rename(name = "leftFootQT")]
40 pub left_foot_qt: crate::root_motion::bakerhumanoidqt::BakerHumanoidQT,
41 #[offset(152)]
42 #[rename(name = "rightFootQT")]
43 pub right_foot_qt: crate::root_motion::bakerhumanoidqt::BakerHumanoidQT,
44 #[offset(160)]
45 #[rename(name = "leftHandQT")]
46 pub left_hand_qt: crate::root_motion::bakerhumanoidqt::BakerHumanoidQT,
47 #[offset(168)]
48 #[rename(name = "rightHandQT")]
49 pub right_hand_qt: crate::root_motion::bakerhumanoidqt::BakerHumanoidQT,
50 #[offset(176)]
51 #[rename(name = "muscles")]
52 pub muscles: ::unity::Array<f32>,
53 #[offset(184)]
54 #[rename(name = "pose")]
55 pub pose: crate::unity_engine::humanpose::HumanPose,
56 #[offset(224)]
57 #[rename(name = "handler")]
58 pub handler: crate::unity_engine::humanposehandler::HumanPoseHandler,
59 #[offset(232)]
60 #[rename(name = "bodyPosition")]
61 pub body_position: crate::unity_engine::vector3::Vector3,
62 #[offset(244)]
63 #[rename(name = "bodyRotation")]
64 pub body_rotation: crate::unity_engine::quaternion::Quaternion,
65 #[offset(260)]
66 #[rename(name = "mN")]
67 pub m_n: i32,
68 #[offset(264)]
69 #[rename(name = "lastBodyRotation")]
70 pub last_body_rotation: crate::unity_engine::quaternion::Quaternion,
71 }
72}
73
74#[cfg(feature = "root_motion-humanoidbaker-types")]
75pub use __types::*;
76
77#[cfg(feature = "root_motion-humanoidbaker")]
78pub trait IHumanoidBakerMethods: IHumanoidBaker {
79 #[doc = "`Awake()` overload"]
80 fn awake(self) -> () {
81 unsafe {
82 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
83 ::unity::il2cpp_call!((::unity::module_base()+0x2a762a0usize)as*mut u8,();
84(HumanoidBaker)__receiver)
85 }
86 }
87 #[doc = "`GetCharacterRoot()` overload"]
88 fn get_character_root(self) -> crate::unity_engine::transform::Transform {
89 unsafe {
90 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91 {
92 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
93 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
94 panic!(
95 "unity: virtual slot {}
96 out of range (vtable len {}
97) on the runtime class behind {}
98 (method `{}
99`)",
100 4usize,
101 __vt.len(),
102 <HumanoidBaker as ::unity::ClassIdentity>::NAME,
103 "GetCharacterRoot",
104 )
105 });
106 let __inner: extern "C" fn(HumanoidBaker, ::unity::OptionalMethod) -> crate::unity_engine::transform::Transform =
107 ::core::mem::transmute(__vi.method_ptr);
108 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
109 __inner(__receiver, __mi)
110 }
111 }
112 }
113 #[doc = "`OnStartBaking()` overload"]
114 fn on_start_baking(self) -> () {
115 unsafe {
116 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117 {
118 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
119 let __vi = *__vt.get(5usize).unwrap_or_else(|| {
120 panic!(
121 "unity: virtual slot {}
122 out of range (vtable len {}
123) on the runtime class behind {}
124 (method `{}
125`)",
126 5usize,
127 __vt.len(),
128 <HumanoidBaker as ::unity::ClassIdentity>::NAME,
129 "OnStartBaking",
130 )
131 });
132 let __inner: extern "C" fn(HumanoidBaker, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
133 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
134 __inner(__receiver, __mi)
135 }
136 }
137 }
138 #[doc = "`OnSetLoopFrame(f32)` overload"]
139 fn on_set_loop_frame(self, time: impl ::core::convert::Into<f32>) -> () {
140 unsafe {
141 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
142 {
143 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
144 let __vi = *__vt.get(6usize).unwrap_or_else(|| {
145 panic!(
146 "unity: virtual slot {}
147 out of range (vtable len {}
148) on the runtime class behind {}
149 (method `{}
150`)",
151 6usize,
152 __vt.len(),
153 <HumanoidBaker as ::unity::ClassIdentity>::NAME,
154 "OnSetLoopFrame",
155 )
156 });
157 let __inner: extern "C" fn(HumanoidBaker, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
158 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
159 __inner(__receiver, ::core::convert::Into::into(time), __mi)
160 }
161 }
162 }
163 #[doc = "`OnSetCurves(*mutcrate::unity_engine::animationclip::AnimationClip)` overload"]
164 fn on_set_curves(self) -> crate::unity_engine::animationclip::AnimationClip {
165 unsafe {
166 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
167 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::animationclip::AnimationClip>::uninit();
168 {
169 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
170 let __vi = *__vt.get(7usize).unwrap_or_else(|| {
171 panic!(
172 "unity: virtual slot {}
173 out of range (vtable len {}
174) on the runtime class behind {}
175 (method `{}
176`)",
177 7usize,
178 __vt.len(),
179 <HumanoidBaker as ::unity::ClassIdentity>::NAME,
180 "OnSetCurves",
181 )
182 });
183 let __inner: extern "C" fn(HumanoidBaker, *mut crate::unity_engine::animationclip::AnimationClip, ::unity::OptionalMethod) -> () =
184 ::core::mem::transmute(__vi.method_ptr);
185 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
186 __inner(__receiver, __out_0.as_mut_ptr(), __mi)
187 };
188 __out_0.assume_init()
189 }
190 }
191 #[doc = "`OnSetKeyframes(f32, bool)` overload"]
192 fn on_set_keyframes(self, time: impl ::core::convert::Into<f32>, last_frame: impl ::core::convert::Into<bool>) -> () {
193 unsafe {
194 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
195 {
196 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
197 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
198 panic!(
199 "unity: virtual slot {}
200 out of range (vtable len {}
201) on the runtime class behind {}
202 (method `{}
203`)",
204 8usize,
205 __vt.len(),
206 <HumanoidBaker as ::unity::ClassIdentity>::NAME,
207 "OnSetKeyframes",
208 )
209 });
210 let __inner: extern "C" fn(HumanoidBaker, f32, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
211 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
212 __inner(
213 __receiver,
214 ::core::convert::Into::into(time),
215 ::core::convert::Into::into(last_frame),
216 __mi,
217 )
218 }
219 }
220 }
221 #[doc = "`UpdateHumanPose()` overload"]
222 fn update_human_pose(self) -> () {
223 unsafe {
224 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
225 ::unity::il2cpp_call!((::unity::module_base()+0x2a76d90usize)as*mut u8,();
226(HumanoidBaker)__receiver)
227 }
228 }
229 #[doc = "`.ctor()` overload"]
230 fn ctor(self) -> () {
231 unsafe {
232 let __receiver = <HumanoidBaker as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
233 ::unity::il2cpp_call!((::unity::module_base()+0x2a76e80usize)as*mut u8,();
234(HumanoidBaker)__receiver)
235 }
236 }
237}
238
239#[cfg(feature = "root_motion-humanoidbaker")]
240impl<__T: IHumanoidBaker> IHumanoidBakerMethods for __T {}
241
242#[cfg(feature = "root_motion-humanoidbaker")]
243impl HumanoidBaker {
244 pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
245 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
246 }
247
248 pub fn get_character_root_method_info() -> &'static ::unity::il2cpp::MethodInfo {
249 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
250 }
251
252 pub fn on_start_baking_method_info() -> &'static ::unity::il2cpp::MethodInfo {
253 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
254 }
255
256 pub fn on_set_loop_frame_method_info() -> &'static ::unity::il2cpp::MethodInfo {
257 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
258 }
259
260 pub fn on_set_curves_method_info() -> &'static ::unity::il2cpp::MethodInfo {
261 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
262 }
263
264 pub fn on_set_keyframes_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
266 }
267
268 pub fn update_human_pose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
269 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
270 }
271
272 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
273 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
274 }
275}
276
277#[cfg(feature = "root_motion-humanoidbaker")]
278impl HumanoidBaker {
279 #[doc = "Direct (non-virtual) call to `HumanoidBaker`'s own `GetCharacterRoot`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
280 pub unsafe fn get_character_root(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::transform::Transform {
281 let __mi = Self::get_character_root_method_info();
282 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::transform::Transform =
283 ::core::mem::transmute(__mi.method_ptr);
284 __inner(this.into(), ::core::option::Option::None)
285 }
286
287 #[doc = "Direct (non-virtual) call to `HumanoidBaker`'s own `OnStartBaking`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
288 pub unsafe fn on_start_baking(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
289 let __mi = Self::on_start_baking_method_info();
290 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
291 __inner(this.into(), ::core::option::Option::None)
292 }
293
294 #[doc = "Direct (non-virtual) call to `HumanoidBaker`'s own `OnSetLoopFrame`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
295 pub unsafe fn on_set_loop_frame(this: impl ::core::convert::Into<::unity::IlInstance>, time: f32) -> () {
296 let __mi = Self::on_set_loop_frame_method_info();
297 let __inner: extern "C" fn(::unity::IlInstance, f32, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
298 __inner(this.into(), time, ::core::option::Option::None)
299 }
300
301 #[doc = "Direct (non-virtual) call to `HumanoidBaker`'s own `OnSetCurves`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
302 pub unsafe fn on_set_curves(
303 this: impl ::core::convert::Into<::unity::IlInstance>,
304 clip: *mut crate::unity_engine::animationclip::AnimationClip,
305 ) -> () {
306 let __mi = Self::on_set_curves_method_info();
307 let __inner: extern "C" fn(::unity::IlInstance, *mut crate::unity_engine::animationclip::AnimationClip, ::unity::OptionalMethod) -> () =
308 ::core::mem::transmute(__mi.method_ptr);
309 __inner(this.into(), clip, ::core::option::Option::None)
310 }
311
312 #[doc = "Direct (non-virtual) call to `HumanoidBaker`'s own `OnSetKeyframes`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
313 pub unsafe fn on_set_keyframes(this: impl ::core::convert::Into<::unity::IlInstance>, time: f32, last_frame: bool) -> () {
314 let __mi = Self::on_set_keyframes_method_info();
315 let __inner: extern "C" fn(::unity::IlInstance, f32, bool, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
316 __inner(this.into(), time, last_frame, ::core::option::Option::None)
317 }
318}
319
320#[cfg(feature = "root_motion-humanoidbaker")]
321impl HumanoidBaker {
322 #[doc = "`.ctor()` — no args"]
323 pub fn new() -> Self {
324 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
325 panic!(
326 "{}
327::{}
328 failed to instantiate",
329 ::core::stringify!(HumanoidBaker),
330 ::core::stringify!(new),
331 )
332 });
333 <Self as IHumanoidBakerMethods>::ctor(this);
334 this
335 }
336}
337
338#[cfg(feature = "root_motion-humanoidbaker")]
339#[doc(hidden)]
340pub mod prelude {
341 pub use super::{HumanoidBaker, IHumanoidBaker, IHumanoidBakerMethods};
342 #[cfg(feature = "root_motion-baker")]
343 pub use crate::root_motion::baker::IBakerMethods;
344 #[cfg(feature = "system-object")]
345 pub use crate::system::object::IObjectMethods;
346 #[cfg(feature = "unity_engine-behaviour")]
347 pub use crate::unity_engine::behaviour::IBehaviourMethods;
348 #[cfg(feature = "unity_engine-component")]
349 pub use crate::unity_engine::component::IComponentMethods;
350 #[cfg(feature = "unity_engine-monobehaviour")]
351 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
352 #[cfg(feature = "unity_engine-object_2")]
353 pub use crate::unity_engine::object_2::IObject_2Methods;
354 pub use crate::{
355 root_motion::baker::IBaker,
356 system::object::IObject,
357 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
358 };
359}