Skip to main content

engage/generated/unity_engine/event_systems/
physicsraycaster.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-event_systems-physicsraycaster-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            event_systems::{
14                baseraycaster::{BaseRaycaster, IBaseRaycaster},
15                uibehaviour::{IUIBehaviour, UIBehaviour},
16            },
17            monobehaviour::{IMonoBehaviour, MonoBehaviour},
18            object_2::{IObject_2, Object_2},
19        },
20    };
21
22    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/event_systems/physicsraycaster/PhysicsRaycaster.md"))]
23    #[::unity::class(namespace = "UnityEngine.EventSystems", name = "PhysicsRaycaster")]
24    #[parent(crate::unity_engine::event_systems::baseraycaster::BaseRaycaster)]
25    pub struct PhysicsRaycaster {
26        #[static_field]
27        #[rename(name = "kNoEventMaskSet")]
28        pub k_no_event_mask_set: i32,
29        #[offset(32)]
30        #[rename(name = "m_EventCamera")]
31        pub m_event_camera: crate::unity_engine::camera::Camera,
32        #[offset(40)]
33        #[rename(name = "m_EventMask")]
34        pub m_event_mask: crate::unity_engine::layermask::LayerMask,
35        #[offset(44)]
36        #[rename(name = "m_MaxRayIntersections")]
37        pub m_max_ray_intersections: i32,
38        #[offset(48)]
39        #[rename(name = "m_LastMaxRayIntersections")]
40        pub m_last_max_ray_intersections: i32,
41        #[offset(56)]
42        #[rename(name = "m_Hits")]
43        pub m_hits: ::unity::Array<crate::unity_engine::raycasthit::RaycastHit>,
44    }
45
46    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/event_systems/physicsraycaster/PhysicsRaycaster_RaycastHitComparer.md"))]
47    #[::unity::class(namespace = "UnityEngine.EventSystems", name = "PhysicsRaycaster.RaycastHitComparer")]
48    #[parent(crate::system::object::Object)]
49    pub struct PhysicsRaycaster_RaycastHitComparer {
50        #[static_field]
51        #[rename(name = "instance")]
52        pub instance: crate::unity_engine::event_systems::physicsraycaster::PhysicsRaycaster_RaycastHitComparer,
53    }
54}
55
56#[cfg(feature = "unity_engine-event_systems-physicsraycaster-types")]
57pub use __types::*;
58
59#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
60pub trait IPhysicsRaycasterMethods: IPhysicsRaycaster {
61    #[doc = "`.ctor()` overload"]
62    fn ctor(self) -> () {
63        unsafe {
64            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
65            ::unity::il2cpp_call!((::unity::module_base()+0x371df70usize)as*mut u8,();
66(PhysicsRaycaster)__receiver)
67        }
68    }
69    #[doc = "`get_eventCamera()` overload"]
70    fn get_event_camera(self) -> crate::unity_engine::camera::Camera {
71        unsafe {
72            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
73            {
74                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
75                let __vi = *__vt.get(18usize).unwrap_or_else(|| {
76                    panic!(
77                        "unity: virtual slot {}
78 out of range (vtable len {}
79) on the runtime class behind {}
80 (method `{}
81`)",
82                        18usize,
83                        __vt.len(),
84                        <PhysicsRaycaster as ::unity::ClassIdentity>::NAME,
85                        "get_eventCamera",
86                    )
87                });
88                let __inner: extern "C" fn(PhysicsRaycaster, ::unity::OptionalMethod) -> crate::unity_engine::camera::Camera =
89                    ::core::mem::transmute(__vi.method_ptr);
90                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
91                __inner(__receiver, __mi)
92            }
93        }
94    }
95    #[doc = "`get_depth()` overload"]
96    fn get_depth(self) -> i32 {
97        unsafe {
98            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
99            {
100                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
101                let __vi = *__vt.get(22usize).unwrap_or_else(|| {
102                    panic!(
103                        "unity: virtual slot {}
104 out of range (vtable len {}
105) on the runtime class behind {}
106 (method `{}
107`)",
108                        22usize,
109                        __vt.len(),
110                        <PhysicsRaycaster as ::unity::ClassIdentity>::NAME,
111                        "get_depth",
112                    )
113                });
114                let __inner: extern "C" fn(PhysicsRaycaster, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__vi.method_ptr);
115                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
116                __inner(__receiver, __mi)
117            }
118        }
119    }
120    #[doc = "`get_finalEventMask()` overload"]
121    fn get_final_event_mask(self) -> i32 {
122        unsafe {
123            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
124            ::unity::il2cpp_call!((::unity::module_base()+0x371e920usize)as*mut u8,i32;
125(PhysicsRaycaster)__receiver)
126        }
127    }
128    #[doc = "`get_eventMask()` overload"]
129    fn get_event_mask(self) -> crate::unity_engine::layermask::LayerMask {
130        unsafe {
131            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
132            ::unity::il2cpp_call!((::unity::module_base()+0x371ebb0usize)as*mut u8,crate::unity_engine::layermask::LayerMask;
133(PhysicsRaycaster)__receiver)
134        }
135    }
136    #[doc = "`set_eventMask(crate::unity_engine::layermask::LayerMask)` overload"]
137    fn set_event_mask(self, value: impl ::core::convert::Into<crate::unity_engine::layermask::LayerMask>) -> () {
138        unsafe {
139            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
140            ::unity::il2cpp_call!((::unity::module_base()+0x371ebc0usize)as*mut u8,();
141(PhysicsRaycaster)__receiver,(crate::unity_engine::layermask::LayerMask)::core::convert::Into::into(value))
142        }
143    }
144    #[doc = "`get_maxRayIntersections()` overload"]
145    fn get_max_ray_intersections(self) -> i32 {
146        unsafe {
147            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
148            ::unity::il2cpp_call!((::unity::module_base()+0x371ebd0usize)as*mut u8,i32;
149(PhysicsRaycaster)__receiver)
150        }
151    }
152    #[doc = "`set_maxRayIntersections(i32)` overload"]
153    fn set_max_ray_intersections(self, value: impl ::core::convert::Into<i32>) -> () {
154        unsafe {
155            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
156            ::unity::il2cpp_call!((::unity::module_base()+0x371ebe0usize)as*mut u8,();
157(PhysicsRaycaster)__receiver,(i32)::core::convert::Into::into(value))
158        }
159    }
160    #[doc = "`ComputeRayAndDistance(crate::unity_engine::event_systems::pointereventdata::PointerEventData, *mutcrate::unity_engine::ray::Ray, *muti32, *mutf32)` overload"]
161    fn compute_ray_and_distance(
162        self,
163        event_data: impl ::core::convert::Into<crate::unity_engine::event_systems::pointereventdata::PointerEventData>,
164    ) -> (bool, crate::unity_engine::ray::Ray, i32, f32) {
165        unsafe {
166            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
167            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::ray::Ray>::uninit();
168            let mut __out_1 = ::core::mem::MaybeUninit::<i32>::uninit();
169            let mut __out_2 = ::core::mem::MaybeUninit::<f32>::uninit();
170            let __ret = {
171                ::unity::il2cpp_call!((::unity::module_base()+0x371e590usize)as*mut u8,bool;
172(PhysicsRaycaster)__receiver,(crate::unity_engine::event_systems::pointereventdata::PointerEventData)::core::convert::Into::into(event_data),(*mut crate::unity_engine::ray::Ray)__out_0.as_mut_ptr(),(*mut i32)__out_1.as_mut_ptr(),(*mut f32)__out_2.as_mut_ptr())
173            };
174            (__ret, __out_0.assume_init(), __out_1.assume_init(), __out_2.assume_init())
175        }
176    }
177    #[doc = "`Raycast(crate::unity_engine::event_systems::pointereventdata::PointerEventData, crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>)` overload"]
178    fn raycast(
179        self,
180        event_data: impl ::core::convert::Into<crate::unity_engine::event_systems::pointereventdata::PointerEventData>,
181        result_append_list: impl ::core::convert::Into<
182            crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
183        >,
184    ) -> () {
185        unsafe {
186            let __receiver = <PhysicsRaycaster as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
187            {
188                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
189                let __vi = *__vt.get(17usize).unwrap_or_else(|| {
190                    panic!(
191                        "unity: virtual slot {}
192 out of range (vtable len {}
193) on the runtime class behind {}
194 (method `{}
195`)",
196                        17usize,
197                        __vt.len(),
198                        <PhysicsRaycaster as ::unity::ClassIdentity>::NAME,
199                        "Raycast",
200                    )
201                });
202                let __inner: extern "C" fn(
203                    PhysicsRaycaster,
204                    crate::unity_engine::event_systems::pointereventdata::PointerEventData,
205                    crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
206                    ::unity::OptionalMethod,
207                ) -> () = ::core::mem::transmute(__vi.method_ptr);
208                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
209                __inner(
210                    __receiver,
211                    ::core::convert::Into::into(event_data),
212                    ::core::convert::Into::into(result_append_list),
213                    __mi,
214                )
215            }
216        }
217    }
218}
219
220#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
221impl<__T: IPhysicsRaycaster> IPhysicsRaycasterMethods for __T {}
222
223#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
224impl PhysicsRaycaster {
225    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
226        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
227    }
228
229    pub fn get_event_camera_method_info() -> &'static ::unity::il2cpp::MethodInfo {
230        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
231    }
232
233    pub fn get_depth_method_info() -> &'static ::unity::il2cpp::MethodInfo {
234        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
235    }
236
237    pub fn get_final_event_mask_method_info() -> &'static ::unity::il2cpp::MethodInfo {
238        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
239    }
240
241    pub fn get_event_mask_method_info() -> &'static ::unity::il2cpp::MethodInfo {
242        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
243    }
244
245    pub fn set_event_mask_method_info() -> &'static ::unity::il2cpp::MethodInfo {
246        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
247    }
248
249    pub fn get_max_ray_intersections_method_info() -> &'static ::unity::il2cpp::MethodInfo {
250        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
251    }
252
253    pub fn set_max_ray_intersections_method_info() -> &'static ::unity::il2cpp::MethodInfo {
254        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
255    }
256
257    pub fn compute_ray_and_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
258        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
259    }
260
261    pub fn raycast_method_info() -> &'static ::unity::il2cpp::MethodInfo {
262        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
263    }
264}
265
266#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
267impl PhysicsRaycaster {
268    #[doc = "Direct (non-virtual) call to `PhysicsRaycaster`'s own `get_eventCamera`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
269    pub unsafe fn get_event_camera(this: impl ::core::convert::Into<::unity::IlInstance>) -> crate::unity_engine::camera::Camera {
270        let __mi = Self::get_event_camera_method_info();
271        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> crate::unity_engine::camera::Camera =
272            ::core::mem::transmute(__mi.method_ptr);
273        __inner(this.into(), ::core::option::Option::None)
274    }
275
276    #[doc = "Direct (non-virtual) call to `PhysicsRaycaster`'s own `get_depth`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
277    pub unsafe fn get_depth(this: impl ::core::convert::Into<::unity::IlInstance>) -> i32 {
278        let __mi = Self::get_depth_method_info();
279        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> i32 = ::core::mem::transmute(__mi.method_ptr);
280        __inner(this.into(), ::core::option::Option::None)
281    }
282
283    #[doc = "Direct (non-virtual) call to `PhysicsRaycaster`'s own `Raycast`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
284    pub unsafe fn raycast(
285        this: impl ::core::convert::Into<::unity::IlInstance>,
286        event_data: crate::unity_engine::event_systems::pointereventdata::PointerEventData,
287        result_append_list: crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
288    ) -> () {
289        let __mi = Self::raycast_method_info();
290        let __inner: extern "C" fn(
291            ::unity::IlInstance,
292            crate::unity_engine::event_systems::pointereventdata::PointerEventData,
293            crate::system::collections::generic::list_1::List_1<crate::unity_engine::event_systems::raycastresult::RaycastResult>,
294            ::unity::OptionalMethod,
295        ) -> () = ::core::mem::transmute(__mi.method_ptr);
296        __inner(this.into(), event_data, result_append_list, ::core::option::Option::None)
297    }
298}
299
300#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
301impl PhysicsRaycaster {
302    #[doc = "`.ctor()` — no args"]
303    pub fn new() -> Self {
304        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
305            panic!(
306                "{}
307::{}
308 failed to instantiate",
309                ::core::stringify!(PhysicsRaycaster),
310                ::core::stringify!(new),
311            )
312        });
313        <Self as IPhysicsRaycasterMethods>::ctor(this);
314        this
315    }
316}
317
318#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
319impl PhysicsRaycaster_RaycastHitComparer {
320    #[doc = "`.cctor()` overload"]
321    pub fn cctor() -> () {
322        unsafe {
323            ::unity::il2cpp_call!((::unity::module_base()+0x3c0df50usize)as*mut u8,();
324            )
325        }
326    }
327}
328
329#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
330pub trait IPhysicsRaycaster_RaycastHitComparerMethods: IPhysicsRaycaster_RaycastHitComparer {
331    #[doc = "`Compare(crate::unity_engine::raycasthit::RaycastHit, crate::unity_engine::raycasthit::RaycastHit)` overload"]
332    fn compare(
333        self,
334        x: impl ::core::convert::Into<crate::unity_engine::raycasthit::RaycastHit>,
335        y: impl ::core::convert::Into<crate::unity_engine::raycasthit::RaycastHit>,
336    ) -> i32 {
337        unsafe {
338            let __receiver = <PhysicsRaycaster_RaycastHitComparer as ::unity::FromIlInstance>::from_il_instance(
339                <Self as ::unity::SystemObject>::as_instance(self),
340            );
341            {
342                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
343                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
344                    panic!(
345                        "unity: virtual slot {}
346 out of range (vtable len {}
347) on the runtime class behind {}
348 (method `{}
349`)",
350                        4usize,
351                        __vt.len(),
352                        <PhysicsRaycaster_RaycastHitComparer as ::unity::ClassIdentity>::NAME,
353                        "Compare",
354                    )
355                });
356                let __inner: extern "C" fn(
357                    PhysicsRaycaster_RaycastHitComparer,
358                    crate::unity_engine::raycasthit::RaycastHit,
359                    crate::unity_engine::raycasthit::RaycastHit,
360                    ::unity::OptionalMethod,
361                ) -> i32 = ::core::mem::transmute(__vi.method_ptr);
362                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
363                __inner(__receiver, ::core::convert::Into::into(x), ::core::convert::Into::into(y), __mi)
364            }
365        }
366    }
367    #[doc = "`.ctor()` overload"]
368    fn ctor(self) -> () {
369        unsafe {
370            let __receiver = <PhysicsRaycaster_RaycastHitComparer as ::unity::FromIlInstance>::from_il_instance(
371                <Self as ::unity::SystemObject>::as_instance(self),
372            );
373            ::unity::il2cpp_call!((::unity::module_base()+0x3c0df40usize)as*mut u8,();
374(PhysicsRaycaster_RaycastHitComparer)__receiver)
375        }
376    }
377}
378
379#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
380impl<__T: IPhysicsRaycaster_RaycastHitComparer> IPhysicsRaycaster_RaycastHitComparerMethods for __T {}
381
382#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
383impl PhysicsRaycaster_RaycastHitComparer {
384    pub fn compare_method_info() -> &'static ::unity::il2cpp::MethodInfo {
385        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
386    }
387
388    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
389        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
390    }
391
392    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
393        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
394    }
395}
396
397#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
398impl PhysicsRaycaster_RaycastHitComparer {
399    #[doc = "Direct (non-virtual) call to `PhysicsRaycaster_RaycastHitComparer`'s own `Compare`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
400    pub unsafe fn compare(
401        this: impl ::core::convert::Into<::unity::IlInstance>,
402        x: crate::unity_engine::raycasthit::RaycastHit,
403        y: crate::unity_engine::raycasthit::RaycastHit,
404    ) -> i32 {
405        let __mi = Self::compare_method_info();
406        let __inner: extern "C" fn(
407            ::unity::IlInstance,
408            crate::unity_engine::raycasthit::RaycastHit,
409            crate::unity_engine::raycasthit::RaycastHit,
410            ::unity::OptionalMethod,
411        ) -> i32 = ::core::mem::transmute(__mi.method_ptr);
412        __inner(this.into(), x, y, ::core::option::Option::None)
413    }
414}
415
416#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
417impl PhysicsRaycaster_RaycastHitComparer {
418    #[doc = "`.ctor()` — no args"]
419    pub fn new() -> Self {
420        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
421            panic!(
422                "{}
423::{}
424 failed to instantiate",
425                ::core::stringify!(PhysicsRaycaster_RaycastHitComparer),
426                ::core::stringify!(new),
427            )
428        });
429        <Self as IPhysicsRaycaster_RaycastHitComparerMethods>::ctor(this);
430        this
431    }
432}
433
434#[cfg(feature = "unity_engine-event_systems-physicsraycaster")]
435#[doc(hidden)]
436pub mod prelude {
437    pub use super::{
438        IPhysicsRaycaster, IPhysicsRaycasterMethods, IPhysicsRaycaster_RaycastHitComparer, IPhysicsRaycaster_RaycastHitComparerMethods,
439        PhysicsRaycaster, PhysicsRaycaster_RaycastHitComparer,
440    };
441    #[cfg(feature = "system-object")]
442    pub use crate::system::object::IObjectMethods;
443    #[cfg(feature = "unity_engine-behaviour")]
444    pub use crate::unity_engine::behaviour::IBehaviourMethods;
445    #[cfg(feature = "unity_engine-component")]
446    pub use crate::unity_engine::component::IComponentMethods;
447    #[cfg(feature = "unity_engine-event_systems-baseraycaster")]
448    pub use crate::unity_engine::event_systems::baseraycaster::IBaseRaycasterMethods;
449    #[cfg(feature = "unity_engine-event_systems-uibehaviour")]
450    pub use crate::unity_engine::event_systems::uibehaviour::IUIBehaviourMethods;
451    #[cfg(feature = "unity_engine-monobehaviour")]
452    pub use crate::unity_engine::monobehaviour::IMonoBehaviourMethods;
453    #[cfg(feature = "unity_engine-object_2")]
454    pub use crate::unity_engine::object_2::IObject_2Methods;
455    pub use crate::{
456        system::object::IObject,
457        unity_engine::{
458            behaviour::IBehaviour,
459            component::IComponent,
460            event_systems::{baseraycaster::IBaseRaycaster, uibehaviour::IUIBehaviour},
461            monobehaviour::IMonoBehaviour,
462            object_2::IObject_2,
463        },
464    };
465}