engage/generated/root_motion/final_ik/
rotationlimithinge.rs1#[cfg(feature = "root_motion-final_ik-rotationlimithinge-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::{
9 root_motion::final_ik::rotationlimit::{IRotationLimit, RotationLimit},
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/rotationlimithinge/RotationLimitHinge.md"))]
20 #[::unity::class(namespace = "RootMotion.FinalIK", name = "RotationLimitHinge")]
21 #[parent(crate::root_motion::final_ik::rotationlimit::RotationLimit)]
22 pub struct RotationLimitHinge {
23 #[offset(56)]
24 #[rename(name = "useLimits")]
25 pub use_limits: bool,
26 #[offset(60)]
27 #[rename(name = "min")]
28 pub min: f32,
29 #[offset(64)]
30 #[rename(name = "max")]
31 pub max: f32,
32 #[offset(68)]
33 #[rename(name = "zeroAxisDisplayOffset")]
34 pub zero_axis_display_offset: f32,
35 #[offset(72)]
36 #[rename(name = "lastAngle")]
37 pub last_angle: f32,
38 }
39}
40
41#[cfg(feature = "root_motion-final_ik-rotationlimithinge-types")]
42pub use __types::*;
43
44#[cfg(feature = "root_motion-final_ik-rotationlimithinge")]
45pub trait IRotationLimitHingeMethods: IRotationLimitHinge {
46 #[doc = "`OpenUserManual()` overload"]
47 fn open_user_manual(self) -> () {
48 unsafe {
49 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
50 ::unity::il2cpp_call!((::unity::module_base()+0x1ec1150usize)as*mut u8,();
51(RotationLimitHinge)__receiver)
52 }
53 }
54 #[doc = "`OpenScriptReference()` overload"]
55 fn open_script_reference(self) -> () {
56 unsafe {
57 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
58 ::unity::il2cpp_call!((::unity::module_base()+0x1ec11a0usize)as*mut u8,();
59(RotationLimitHinge)__receiver)
60 }
61 }
62 #[doc = "`SupportGroup()` overload"]
63 fn support_group(self) -> () {
64 unsafe {
65 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
66 ::unity::il2cpp_call!((::unity::module_base()+0x1ec11f0usize)as*mut u8,();
67(RotationLimitHinge)__receiver)
68 }
69 }
70 #[doc = "`ASThread()` overload"]
71 fn as_thread(self) -> () {
72 unsafe {
73 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
74 ::unity::il2cpp_call!((::unity::module_base()+0x1ec1240usize)as*mut u8,();
75(RotationLimitHinge)__receiver)
76 }
77 }
78 #[doc = "`LimitRotation(crate::unity_engine::quaternion::Quaternion)` overload"]
79 fn limit_rotation(
80 self,
81 rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
82 ) -> crate::unity_engine::quaternion::Quaternion {
83 unsafe {
84 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
85 {
86 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
87 let __vi = *__vt.get(4usize).unwrap_or_else(|| {
88 panic!(
89 "unity: virtual slot {}
90 out of range (vtable len {}
91) on the runtime class behind {}
92 (method `{}
93`)",
94 4usize,
95 __vt.len(),
96 <RotationLimitHinge as ::unity::ClassIdentity>::NAME,
97 "LimitRotation",
98 )
99 });
100 let __inner: extern "C" fn(
101 RotationLimitHinge,
102 crate::unity_engine::quaternion::Quaternion,
103 ::unity::OptionalMethod,
104 ) -> crate::unity_engine::quaternion::Quaternion = ::core::mem::transmute(__vi.method_ptr);
105 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
106 __inner(__receiver, ::core::convert::Into::into(rotation), __mi)
107 }
108 }
109 }
110 #[doc = "`LimitHinge(crate::unity_engine::quaternion::Quaternion)` overload"]
111 fn limit_hinge(
112 self,
113 rotation: impl ::core::convert::Into<crate::unity_engine::quaternion::Quaternion>,
114 ) -> crate::unity_engine::quaternion::Quaternion {
115 unsafe {
116 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117 ::unity::il2cpp_call!((::unity::module_base()+0x1ec12a0usize)as*mut u8,crate::unity_engine::quaternion::Quaternion;
118(RotationLimitHinge)__receiver,(crate::unity_engine::quaternion::Quaternion)::core::convert::Into::into(rotation))
119 }
120 }
121 #[doc = "`.ctor()` overload"]
122 fn ctor(self) -> () {
123 unsafe {
124 let __receiver = <RotationLimitHinge as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
125 ::unity::il2cpp_call!((::unity::module_base()+0x1ec1480usize)as*mut u8,();
126(RotationLimitHinge)__receiver)
127 }
128 }
129}
130
131#[cfg(feature = "root_motion-final_ik-rotationlimithinge")]
132impl<__T: IRotationLimitHinge> IRotationLimitHingeMethods for __T {}
133
134#[cfg(feature = "root_motion-final_ik-rotationlimithinge")]
135impl RotationLimitHinge {
136 pub fn open_user_manual_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
138 }
139
140 pub fn open_script_reference_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
142 }
143
144 pub fn support_group_method_info() -> &'static ::unity::il2cpp::MethodInfo {
145 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
146 }
147
148 pub fn as_thread_method_info() -> &'static ::unity::il2cpp::MethodInfo {
149 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
150 }
151
152 pub fn limit_rotation_method_info() -> &'static ::unity::il2cpp::MethodInfo {
153 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
154 }
155
156 pub fn limit_hinge_method_info() -> &'static ::unity::il2cpp::MethodInfo {
157 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
158 }
159
160 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
161 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
162 }
163}
164
165#[cfg(feature = "root_motion-final_ik-rotationlimithinge")]
166impl RotationLimitHinge {
167 #[doc = "Direct (non-virtual) call to `RotationLimitHinge`'s own `LimitRotation`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
168 pub unsafe fn limit_rotation(
169 this: impl ::core::convert::Into<::unity::IlInstance>,
170 rotation: crate::unity_engine::quaternion::Quaternion,
171 ) -> crate::unity_engine::quaternion::Quaternion {
172 let __mi = Self::limit_rotation_method_info();
173 let __inner: extern "C" fn(
174 ::unity::IlInstance,
175 crate::unity_engine::quaternion::Quaternion,
176 ::unity::OptionalMethod,
177 ) -> crate::unity_engine::quaternion::Quaternion = ::core::mem::transmute(__mi.method_ptr);
178 __inner(this.into(), rotation, ::core::option::Option::None)
179 }
180}
181
182#[cfg(feature = "root_motion-final_ik-rotationlimithinge")]
183impl RotationLimitHinge {
184 #[doc = "`.ctor()` — no args"]
185 pub fn new() -> Self {
186 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
187 panic!(
188 "{}
189::{}
190 failed to instantiate",
191 ::core::stringify!(RotationLimitHinge),
192 ::core::stringify!(new),
193 )
194 });
195 <Self as IRotationLimitHingeMethods>::ctor(this);
196 this
197 }
198}
199
200#[cfg(feature = "root_motion-final_ik-rotationlimithinge")]
201#[doc(hidden)]
202pub mod prelude {
203 pub use super::{IRotationLimitHinge, IRotationLimitHingeMethods, RotationLimitHinge};
204 #[cfg(feature = "root_motion-final_ik-rotationlimit")]
205 pub use crate::root_motion::final_ik::rotationlimit::IRotationLimitMethods;
206 #[cfg(feature = "system-object")]
207 pub use crate::system::object::IObjectMethods;
208 #[cfg(feature = "unity_engine-behaviour")]
209 pub use crate::unity_engine::behaviour::IBehaviourMethods;
210 #[cfg(feature = "unity_engine-component")]
211 pub use crate::unity_engine::component::IComponentMethods;
212 #[cfg(feature = "unity_engine-monobehaviour")]
213 pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
214 #[cfg(feature = "unity_engine-object_2")]
215 pub use crate::unity_engine::object_2::IObject_2Methods;
216 pub use crate::{
217 root_motion::final_ik::rotationlimit::IRotationLimit,
218 system::object::IObject,
219 unity_engine::{behaviour::IBehaviour, component::IComponent, monobehaviour::IMonoBehaviour, object_2::IObject_2},
220 };
221}