Skip to main content

engage/generated/root_motion/final_ik/
inertia.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "root_motion-final_ik-inertia-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::{
9        root_motion::final_ik::offsetmodifier::{IOffsetModifier, OffsetModifier},
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/final_ik/inertia/Inertia_Body_EffectorLink.md"))]
20    #[::unity::class(namespace = "RootMotion.FinalIK", name = "Inertia.Body.EffectorLink")]
21    #[parent(crate::system::object::Object)]
22    pub struct Inertia_Body_EffectorLink {
23        #[offset(16)]
24        #[rename(name = "effector")]
25        pub effector: crate::root_motion::final_ik::fullbodybipedeffector::FullBodyBipedEffector,
26        #[offset(20)]
27        #[rename(name = "weight")]
28        pub weight: f32,
29    }
30
31    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/final_ik/inertia/Inertia.md"))]
32    #[::unity::class(namespace = "RootMotion.FinalIK", name = "Inertia")]
33    #[parent(crate::root_motion::final_ik::offsetmodifier::OffsetModifier)]
34    pub struct Inertia {
35        #[offset(48)]
36        #[rename(name = "bodies")]
37        pub bodies: ::unity::Array<crate::root_motion::final_ik::inertia::Inertia_Body>,
38        #[offset(56)]
39        #[rename(name = "limits")]
40        pub limits: ::unity::Array<crate::root_motion::final_ik::offsetmodifier::OffsetModifier_OffsetLimits>,
41    }
42
43    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/root_motion/final_ik/inertia/Inertia_Body.md"))]
44    #[::unity::class(namespace = "RootMotion.FinalIK", name = "Inertia.Body")]
45    #[parent(crate::system::object::Object)]
46    pub struct Inertia_Body {
47        #[offset(16)]
48        #[rename(name = "transform")]
49        pub transform: crate::unity_engine::transform::Transform,
50        #[offset(24)]
51        #[rename(name = "effectorLinks")]
52        pub effector_links: ::unity::Array<crate::root_motion::final_ik::inertia::Inertia_Body_EffectorLink>,
53        #[offset(32)]
54        #[rename(name = "speed")]
55        pub speed: f32,
56        #[offset(36)]
57        #[rename(name = "acceleration")]
58        pub acceleration: f32,
59        #[offset(40)]
60        #[rename(name = "matchVelocity")]
61        pub match_velocity: f32,
62        #[offset(44)]
63        #[rename(name = "gravity")]
64        pub gravity: f32,
65        #[offset(48)]
66        #[rename(name = "delta")]
67        pub delta: crate::unity_engine::vector3::Vector3,
68        #[offset(60)]
69        #[rename(name = "lazyPoint")]
70        pub lazy_point: crate::unity_engine::vector3::Vector3,
71        #[offset(72)]
72        #[rename(name = "direction")]
73        pub direction: crate::unity_engine::vector3::Vector3,
74        #[offset(84)]
75        #[rename(name = "lastPosition")]
76        pub last_position: crate::unity_engine::vector3::Vector3,
77        #[offset(96)]
78        #[rename(name = "firstUpdate")]
79        pub first_update: bool,
80    }
81}
82
83#[cfg(feature = "root_motion-final_ik-inertia-types")]
84pub use __types::*;
85
86#[cfg(feature = "root_motion-final_ik-inertia")]
87pub trait IInertia_Body_EffectorLinkMethods: IInertia_Body_EffectorLink {
88    #[doc = "`.ctor()` overload"]
89    fn ctor(self) -> () {
90        unsafe {
91            let __receiver =
92                <Inertia_Body_EffectorLink as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
93            ::unity::il2cpp_call!((::unity::module_base()+0x1b66220usize)as*mut u8,();
94(Inertia_Body_EffectorLink)__receiver)
95        }
96    }
97}
98
99#[cfg(feature = "root_motion-final_ik-inertia")]
100impl<__T: IInertia_Body_EffectorLink> IInertia_Body_EffectorLinkMethods for __T {}
101
102#[cfg(feature = "root_motion-final_ik-inertia")]
103impl Inertia_Body_EffectorLink {
104    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
105        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
106    }
107}
108
109#[cfg(feature = "root_motion-final_ik-inertia")]
110impl Inertia_Body_EffectorLink {
111    #[doc = "`.ctor()` — no args"]
112    pub fn new() -> Self {
113        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
114            panic!(
115                "{}
116::{}
117 failed to instantiate",
118                ::core::stringify!(Inertia_Body_EffectorLink),
119                ::core::stringify!(new),
120            )
121        });
122        <Self as IInertia_Body_EffectorLinkMethods>::ctor(this);
123        this
124    }
125}
126
127#[cfg(feature = "root_motion-final_ik-inertia")]
128pub trait IInertiaMethods: IInertia {
129    #[doc = "`ResetBodies()` overload"]
130    fn reset_bodies(self) -> () {
131        unsafe {
132            let __receiver = <Inertia as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
133            ::unity::il2cpp_call!((::unity::module_base()+0x290ef50usize)as*mut u8,();
134(Inertia)__receiver)
135        }
136    }
137    #[doc = "`OnModifyOffset()` overload"]
138    fn on_modify_offset(self) -> () {
139        unsafe {
140            let __receiver = <Inertia as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141            {
142                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
143                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
144                    panic!(
145                        "unity: virtual slot {}
146 out of range (vtable len {}
147) on the runtime class behind {}
148 (method `{}
149`)",
150                        4usize,
151                        __vt.len(),
152                        <Inertia as ::unity::ClassIdentity>::NAME,
153                        "OnModifyOffset",
154                    )
155                });
156                let __inner: extern "C" fn(Inertia, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
157                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
158                __inner(__receiver, __mi)
159            }
160        }
161    }
162    #[doc = "`.ctor()` overload"]
163    fn ctor(self) -> () {
164        unsafe {
165            let __receiver = <Inertia as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
166            ::unity::il2cpp_call!((::unity::module_base()+0x290f090usize)as*mut u8,();
167(Inertia)__receiver)
168        }
169    }
170}
171
172#[cfg(feature = "root_motion-final_ik-inertia")]
173impl<__T: IInertia> IInertiaMethods for __T {}
174
175#[cfg(feature = "root_motion-final_ik-inertia")]
176impl Inertia {
177    pub fn reset_bodies_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
179    }
180
181    pub fn on_modify_offset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
183    }
184
185    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
187    }
188}
189
190#[cfg(feature = "root_motion-final_ik-inertia")]
191impl Inertia {
192    #[doc = "Direct (non-virtual) call to `Inertia`'s own `OnModifyOffset`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
193    pub unsafe fn on_modify_offset(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
194        let __mi = Self::on_modify_offset_method_info();
195        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
196        __inner(this.into(), ::core::option::Option::None)
197    }
198}
199
200#[cfg(feature = "root_motion-final_ik-inertia")]
201impl Inertia {
202    #[doc = "`.ctor()` — no args"]
203    pub fn new() -> Self {
204        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
205            panic!(
206                "{}
207::{}
208 failed to instantiate",
209                ::core::stringify!(Inertia),
210                ::core::stringify!(new),
211            )
212        });
213        <Self as IInertiaMethods>::ctor(this);
214        this
215    }
216}
217
218#[cfg(feature = "root_motion-final_ik-inertia")]
219pub trait IInertia_BodyMethods: IInertia_Body {
220    #[doc = "`Reset()` overload"]
221    fn reset(self) -> () {
222        unsafe {
223            let __receiver = <Inertia_Body as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
224            ::unity::il2cpp_call!((::unity::module_base()+0x1fc6f20usize)as*mut u8,();
225(Inertia_Body)__receiver)
226        }
227    }
228    #[doc = "`Update(crate::root_motion::final_ik::iksolverfullbodybiped::IKSolverFullBodyBiped, f32, f32)` overload"]
229    fn update(
230        self,
231        solver: impl ::core::convert::Into<crate::root_motion::final_ik::iksolverfullbodybiped::IKSolverFullBodyBiped>,
232        weight: impl ::core::convert::Into<f32>,
233        delta_time: impl ::core::convert::Into<f32>,
234    ) -> () {
235        unsafe {
236            let __receiver = <Inertia_Body as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
237            ::unity::il2cpp_call!((::unity::module_base()+0x1fc6fe0usize)as*mut u8,();
238(Inertia_Body)__receiver,(crate::root_motion::final_ik::iksolverfullbodybiped::IKSolverFullBodyBiped)::core::convert::Into::into(solver),(f32)::core::convert::Into::into(weight),(f32)::core::convert::Into::into(delta_time))
239        }
240    }
241    #[doc = "`.ctor()` overload"]
242    fn ctor(self) -> () {
243        unsafe {
244            let __receiver = <Inertia_Body as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
245            ::unity::il2cpp_call!((::unity::module_base()+0x1fc7290usize)as*mut u8,();
246(Inertia_Body)__receiver)
247        }
248    }
249}
250
251#[cfg(feature = "root_motion-final_ik-inertia")]
252impl<__T: IInertia_Body> IInertia_BodyMethods for __T {}
253
254#[cfg(feature = "root_motion-final_ik-inertia")]
255impl Inertia_Body {
256    pub fn reset_method_info() -> &'static ::unity::il2cpp::MethodInfo {
257        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
258    }
259
260    pub fn update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
261        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
262    }
263
264    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
265        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
266    }
267}
268
269#[cfg(feature = "root_motion-final_ik-inertia")]
270impl Inertia_Body {
271    #[doc = "`.ctor()` — no args"]
272    pub fn new() -> Self {
273        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
274            panic!(
275                "{}
276::{}
277 failed to instantiate",
278                ::core::stringify!(Inertia_Body),
279                ::core::stringify!(new),
280            )
281        });
282        <Self as IInertia_BodyMethods>::ctor(this);
283        this
284    }
285}
286
287#[cfg(feature = "root_motion-final_ik-inertia")]
288#[doc(hidden)]
289pub mod prelude {
290    pub use super::{
291        IInertia, IInertiaMethods, IInertia_Body, IInertia_BodyMethods, IInertia_Body_EffectorLink, IInertia_Body_EffectorLinkMethods, Inertia,
292        Inertia_Body, Inertia_Body_EffectorLink,
293    };
294    #[cfg(feature = "root_motion-final_ik-offsetmodifier")]
295    pub use crate::root_motion::final_ik::offsetmodifier::IOffsetModifierMethods;
296    #[cfg(feature = "system-object")]
297    pub use crate::system::object::IObjectMethods;
298    #[cfg(feature = "unity_engine-behaviour")]
299    pub use crate::unity_engine::behaviour::IBehaviourMethods;
300    #[cfg(feature = "unity_engine-component")]
301    pub use crate::unity_engine::component::IComponentMethods;
302    #[cfg(feature = "unity_engine-monobehaviour")]
303    pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
304    #[cfg(feature = "unity_engine-object_2")]
305    pub use crate::unity_engine::object_2::IObject_2Methods;
306    pub use crate::{
307        root_motion::final_ik::offsetmodifier::IOffsetModifier,
308        system::object::IObject,
309        unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
310    };
311}