Skip to main content

engage/generated/root_motion/final_ik/
rotationlimit.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "root_motion-final_ik-rotationlimit-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/rotationlimit/RotationLimit.md"))]
19    #[::unity::class(namespace = "RootMotion.FinalIK", name = "RotationLimit")]
20    #[parent(crate::unity_engine::monobehaviour::MonoBehaviour)]
21    pub struct RotationLimit {
22        #[offset(24)]
23        #[rename(name = "axis")]
24        pub axis: crate::unity_engine::vector3::Vector3,
25        #[offset(36)]
26        #[rename(name = "defaultLocalRotation")]
27        pub default_local_rotation_field: crate::unity_engine::quaternion::Quaternion,
28        #[offset(53)]
29        #[rename(name = "initiated")]
30        pub initiated: bool,
31        #[offset(54)]
32        #[rename(name = "applicationQuit")]
33        pub application_quit: bool,
34        #[offset(55)]
35        #[rename(name = "defaultLocalRotationSet")]
36        pub default_local_rotation_set: bool,
37    }
38}
39
40#[cfg(feature = "root_motion-final_ik-rotationlimit-types")]
41pub use __types::*;
42
43#[cfg(feature = "root_motion-final_ik-rotationlimit")]
44impl RotationLimit {
45    #[doc = "`Limit1DOF(crate::unity_engine::quaternion::Quaternion, crate::unity_engine::vector3::Vector3)` overload"]
46    pub fn limit1_dof(
47        rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
48        axis: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
49    ) -> crate::unity_engine::quaternion::Quaternion {
50        unsafe {
51            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0b00usize)as*mut u8,crate::unity_engine::quaternion::Quaternion;
52(crate::unity_engine::quaternion::Quaternion)::core::convert::Into::into(rotation),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(axis))
53        }
54    }
55
56    #[doc = "`LimitTwist(crate::unity_engine::quaternion::Quaternion, crate::unity_engine::vector3::Vector3, crate::unity_engine::vector3::Vector3, f32)` overload"]
57    pub fn limit_twist(
58        rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
59        axis: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
60        ortho_axis: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
61        twist_limit: impl ::core::convert::Into<f32>,
62    ) -> crate::unity_engine::quaternion::Quaternion {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0b80usize)as*mut u8,crate::unity_engine::quaternion::Quaternion;
65(crate::unity_engine::quaternion::Quaternion)::core::convert::Into::into(rotation),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(axis),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(ortho_axis),(f32)::core::convert::Into::into(twist_limit))
66        }
67    }
68
69    #[doc = "`GetOrthogonalAngle(crate::unity_engine::vector3::Vector3, crate::unity_engine::vector3::Vector3, crate::unity_engine::vector3::Vector3)` overload"]
70    pub fn get_orthogonal_angle(
71        v1: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
72        v2: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
73        normal: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
74    ) -> f32 {
75        unsafe {
76            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0d10usize)as*mut u8,f32;
77(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(v1),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(v2),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(normal))
78        }
79    }
80}
81
82#[cfg(feature = "root_motion-final_ik-rotationlimit")]
83pub trait IRotationLimitMethods: IRotationLimit {
84    #[doc = "`SetDefaultLocalRotation()` overload"]
85    fn set_default_local_rotation(self) -> () {
86        unsafe {
87            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
88            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0730usize)as*mut u8,();
89(RotationLimit)__receiver)
90        }
91    }
92    #[doc = "`SetDefaultLocalRotation(crate::unity_engine::quaternion::Quaternion)` overload"]
93    fn set_default_local_rotation_2(self, local_rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>) -> () {
94        unsafe {
95            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
96            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0780usize)as*mut u8,();
97(RotationLimit)__receiver,(crate::unity_engine::quaternion::Quaternion)::core::convert::Into::into(local_rotation))
98        }
99    }
100    #[doc = "`GetLimitedLocalRotation(crate::unity_engine::quaternion::Quaternion, *mutbool)` overload"]
101    fn get_limited_local_rotation(
102        self,
103        local_rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
104    ) -> (crate::unity_engine::quaternion::Quaternion, bool) {
105        unsafe {
106            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
107            let mut __out_0 = ::core::mem::MaybeUninit::<bool>::uninit();
108            let __ret = {
109                ::unity::il2cpp_call!((::unity::module_base()+0x1ec07a0usize)as*mut u8,crate::unity_engine::quaternion::Quaternion;
110(RotationLimit)__receiver,(crate::unity_engine::quaternion::Quaternion)::core::convert::Into::into(local_rotation),(*mut bool)__out_0.as_mut_ptr())
111            };
112            (__ret, __out_0.assume_init())
113        }
114    }
115    #[doc = "`Apply()` overload"]
116    fn apply(self) -> bool {
117        unsafe {
118            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
119            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0960usize)as*mut u8,bool;
120(RotationLimit)__receiver)
121        }
122    }
123    #[doc = "`Disable()` overload"]
124    fn disable(self) -> () {
125        unsafe {
126            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
127            ::unity::il2cpp_call!((::unity::module_base()+0x1ec09d0usize)as*mut u8,();
128(RotationLimit)__receiver)
129        }
130    }
131    #[doc = "`get_secondaryAxis()` overload"]
132    fn get_secondary_axis(self) -> crate::unity_engine::vector3::Vector3 {
133        unsafe {
134            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
135            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0a10usize)as*mut u8,crate::unity_engine::vector3::Vector3;
136(RotationLimit)__receiver)
137        }
138    }
139    #[doc = "`get_crossAxis()` overload"]
140    fn get_cross_axis(self) -> crate::unity_engine::vector3::Vector3 {
141        unsafe {
142            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
143            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0a20usize)as*mut u8,crate::unity_engine::vector3::Vector3;
144(RotationLimit)__receiver)
145        }
146    }
147    #[doc = "`get_defaultLocalRotationOverride()` overload"]
148    fn get_default_local_rotation_override(self) -> bool {
149        unsafe {
150            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
151            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0a40usize)as*mut u8,bool;
152(RotationLimit)__receiver)
153        }
154    }
155    #[doc = "`set_defaultLocalRotationOverride(bool)` overload"]
156    fn set_default_local_rotation_override(self, value: impl ::core::convert::Into<bool>) -> () {
157        unsafe {
158            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
159            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0a50usize)as*mut u8,();
160(RotationLimit)__receiver,(bool)::core::convert::Into::into(value))
161        }
162    }
163    #[doc = "`LimitRotation(crate::unity_engine::quaternion::Quaternion)` overload"]
164    fn limit_rotation(
165        self,
166        rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
167    ) -> crate::unity_engine::quaternion::Quaternion {
168        unsafe {
169            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
170            {
171                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
172                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
173                    panic!(
174                        "unity: virtual slot {}
175 out of range (vtable len {}
176) on the runtime class behind {}
177 (method `{}
178`)",
179                        4usize,
180                        __vt.len(),
181                        <RotationLimit as ::unity::ClassIdentity>::NAME,
182                        "LimitRotation",
183                    )
184                });
185                let __inner: extern "C" fn(
186                    RotationLimit,
187                    crate::unity_engine::quaternion::Quaternion,
188                    ::unity::OptionalMethod,
189                ) -> crate::unity_engine::quaternion::Quaternion = ::core::mem::transmute(__vi.method_ptr);
190                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
191                __inner(__receiver, ::core::convert::Into::into(rotation), __mi)
192            }
193        }
194    }
195    #[doc = "`Awake()` overload"]
196    fn awake(self) -> () {
197        unsafe {
198            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
199            ::unity::il2cpp_call!((::unity::module_base()+0x1ec08c0usize)as*mut u8,();
200(RotationLimit)__receiver)
201        }
202    }
203    #[doc = "`LateUpdate()` overload"]
204    fn late_update(self) -> () {
205        unsafe {
206            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
207            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0a60usize)as*mut u8,();
208(RotationLimit)__receiver)
209        }
210    }
211    #[doc = "`LogWarning(::unity::Il2CppString)` overload"]
212    fn log_warning(self, message: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
213        unsafe {
214            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
215            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0ac0usize)as*mut u8,();
216(RotationLimit)__receiver,(::unity::Il2CppString)::core::convert::Into::into(message))
217        }
218    }
219    #[doc = "`.ctor()` overload"]
220    fn ctor(self) -> () {
221        unsafe {
222            let __receiver = <RotationLimit as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
223            ::unity::il2cpp_call!((::unity::module_base()+0x1ec0d80usize)as*mut u8,();
224(RotationLimit)__receiver)
225        }
226    }
227}
228
229#[cfg(feature = "root_motion-final_ik-rotationlimit")]
230impl<__T: IRotationLimit> IRotationLimitMethods for __T {}
231
232#[cfg(feature = "root_motion-final_ik-rotationlimit")]
233impl RotationLimit {
234    pub fn set_default_local_rotation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
235        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
236    }
237
238    pub fn set_default_local_rotation_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
239        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
240    }
241
242    pub fn get_limited_local_rotation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
243        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
244    }
245
246    pub fn apply_method_info() -> &'static ::unity::il2cpp::MethodInfo {
247        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
248    }
249
250    pub fn disable_method_info() -> &'static ::unity::il2cpp::MethodInfo {
251        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
252    }
253
254    pub fn get_secondary_axis_method_info() -> &'static ::unity::il2cpp::MethodInfo {
255        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
256    }
257
258    pub fn get_cross_axis_method_info() -> &'static ::unity::il2cpp::MethodInfo {
259        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
260    }
261
262    pub fn get_default_local_rotation_override_method_info() -> &'static ::unity::il2cpp::MethodInfo {
263        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
264    }
265
266    pub fn set_default_local_rotation_override_method_info() -> &'static ::unity::il2cpp::MethodInfo {
267        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
268    }
269
270    pub fn limit_rotation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
271        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
272    }
273
274    pub fn awake_method_info() -> &'static ::unity::il2cpp::MethodInfo {
275        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
276    }
277
278    pub fn late_update_method_info() -> &'static ::unity::il2cpp::MethodInfo {
279        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
280    }
281
282    pub fn log_warning_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
284    }
285
286    pub fn limit1_dof_method_info() -> &'static ::unity::il2cpp::MethodInfo {
287        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
288    }
289
290    pub fn limit_twist_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
292    }
293
294    pub fn get_orthogonal_angle_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
296    }
297
298    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
300    }
301}
302
303#[cfg(feature = "root_motion-final_ik-rotationlimit")]
304impl RotationLimit {
305    #[doc = "Direct (non-virtual) call to `RotationLimit`'s own `LimitRotation`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
306    pub unsafe fn limit_rotation(
307        this: impl ::core::convert::Into<::unity::IlInstance>,
308        rotation: crate::unity_engine::quaternion::Quaternion,
309    ) -> crate::unity_engine::quaternion::Quaternion {
310        let __mi = Self::limit_rotation_method_info();
311        let __inner: extern "C" fn(
312            ::unity::IlInstance,
313            crate::unity_engine::quaternion::Quaternion,
314            ::unity::OptionalMethod,
315        ) -> crate::unity_engine::quaternion::Quaternion = ::core::mem::transmute(__mi.method_ptr);
316        __inner(this.into(), rotation, ::core::option::Option::None)
317    }
318}
319
320#[cfg(feature = "root_motion-final_ik-rotationlimit")]
321impl RotationLimit {
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!(RotationLimit),
330                ::core::stringify!(new),
331            )
332        });
333        <Self as IRotationLimitMethods>::ctor(this);
334        this
335    }
336}
337
338#[cfg(feature = "root_motion-final_ik-rotationlimit")]
339#[doc(hidden)]
340pub mod prelude {
341    pub use super::{IRotationLimit, IRotationLimitMethods, RotationLimit};
342    #[cfg(feature = "system-object")]
343    pub use crate::system::object::IObjectMethods;
344    #[cfg(feature = "unity_engine-behaviour")]
345    pub use crate::unity_engine::behaviour::IBehaviourMethods;
346    #[cfg(feature = "unity_engine-component")]
347    pub use crate::unity_engine::component::IComponentMethods;
348    #[cfg(feature = "unity_engine-monobehaviour")]
349    pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
350    #[cfg(feature = "unity_engine-object_2")]
351    pub use crate::unity_engine::object_2::IObject_2Methods;
352    pub use crate::{
353        system::object::IObject,
354        unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
355    };
356}