Skip to main content

engage/generated/unity_engine/
contactfilter2d.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-contactfilter2d-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        valuetype::{IValueType, ValueType},
11    };
12
13    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/contactfilter2d/ContactFilter2D.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct ContactFilter2D {
17        pub use_triggers: bool,
18        pub use_layer_mask: bool,
19        pub use_depth: bool,
20        pub use_outside_depth: bool,
21        pub use_normal_angle: bool,
22        pub use_outside_normal_angle: bool,
23        pub layer_mask: crate::unity_engine::layermask::LayerMask,
24        pub min_depth: f32,
25        pub max_depth: f32,
26        pub min_normal_angle: f32,
27        pub max_normal_angle: f32,
28    }
29    impl ::unity::ClassIdentity for ContactFilter2D {
30        const NAME: &'static str = "ContactFilter2D";
31        const NAMESPACE: &'static str = "UnityEngine";
32
33        fn class() -> ::unity::Class {
34            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
35            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
36        }
37    }
38    impl ::unity::IlType for ContactFilter2D {
39        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
40            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
41        }
42    }
43}
44
45#[cfg(feature = "unity_engine-contactfilter2d-types")]
46pub use __types::*;
47
48#[cfg(feature = "unity_engine-contactfilter2d")]
49impl ContactFilter2D {
50    #[doc = "`CreateLegacyFilter(i32, f32, f32)` overload"]
51    pub fn create_legacy_filter(
52        layer_mask: impl ::core::convert::Into<i32>,
53        min_depth: impl ::core::convert::Into<f32>,
54        max_depth: impl ::core::convert::Into<f32>,
55    ) -> crate::unity_engine::contactfilter2d::ContactFilter2D {
56        unsafe {
57            ::unity::il2cpp_call!((::unity::module_base()+0x3f31e60usize)as*mut u8,crate::unity_engine::contactfilter2d::ContactFilter2D;
58(i32)::core::convert::Into::into(layer_mask),(f32)::core::convert::Into::into(min_depth),(f32)::core::convert::Into::into(max_depth))
59        }
60    }
61
62    #[doc = "`CheckConsistency_Injected(*mutcrate::unity_engine::contactfilter2d::ContactFilter2D)` overload"]
63    pub fn check_consistency_injected() -> crate::unity_engine::contactfilter2d::ContactFilter2D {
64        unsafe {
65            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::contactfilter2d::ContactFilter2D>::uninit();
66            ::unity::il2cpp_call!((::unity::module_base()+0x3f31da0usize)as*mut u8,();
67(*mut crate::unity_engine::contactfilter2d::ContactFilter2D)__out_0.as_mut_ptr());
68            __out_0.assume_init()
69        }
70    }
71}
72
73#[cfg(feature = "unity_engine-contactfilter2d")]
74impl ContactFilter2D {
75    #[doc = "`CheckConsistency()` overload"]
76    pub fn check_consistency(&mut self) -> () {
77        unsafe {
78            ::unity::il2cpp_call!((::unity::module_base()+0x3f31d50usize)as*mut u8,();
79(*mut ContactFilter2D)self as*mut ContactFilter2D)
80        }
81    }
82
83    #[doc = "`SetLayerMask(crate::unity_engine::layermask::LayerMask)` overload"]
84    pub fn set_layer_mask(&mut self, layer_mask: impl ::core::convert::Into<crate::unity_engine::layermask::LayerMask>) -> () {
85        unsafe {
86            ::unity::il2cpp_call!((::unity::module_base()+0x3f31df0usize)as*mut u8,();
87(*mut ContactFilter2D)self as*mut ContactFilter2D,(crate::unity_engine::layermask::LayerMask)::core::convert::Into::into(layer_mask))
88        }
89    }
90
91    #[doc = "`SetDepth(f32, f32)` overload"]
92    pub fn set_depth(&mut self, min_depth: impl ::core::convert::Into<f32>, max_depth: impl ::core::convert::Into<f32>) -> () {
93        unsafe {
94            ::unity::il2cpp_call!((::unity::module_base()+0x3f31e00usize)as*mut u8,();
95(*mut ContactFilter2D)self as*mut ContactFilter2D,(f32)::core::convert::Into::into(min_depth),(f32)::core::convert::Into::into(max_depth))
96        }
97    }
98}
99
100#[cfg(feature = "unity_engine-contactfilter2d")]
101impl ContactFilter2D {
102    pub fn check_consistency_method_info() -> &'static ::unity::il2cpp::MethodInfo {
103        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
104    }
105
106    pub fn set_layer_mask_method_info() -> &'static ::unity::il2cpp::MethodInfo {
107        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
108    }
109
110    pub fn set_depth_method_info() -> &'static ::unity::il2cpp::MethodInfo {
111        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
112    }
113
114    pub fn create_legacy_filter_method_info() -> &'static ::unity::il2cpp::MethodInfo {
115        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
116    }
117
118    pub fn check_consistency_injected_method_info() -> &'static ::unity::il2cpp::MethodInfo {
119        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
120    }
121}
122
123#[cfg(feature = "unity_engine-contactfilter2d")]
124#[doc(hidden)]
125pub mod prelude {
126    pub use super::ContactFilter2D;
127    #[cfg(feature = "system-object")]
128    pub use crate::system::object::IObjectMethods;
129    #[cfg(feature = "system-valuetype")]
130    pub use crate::system::valuetype::IValueTypeMethods;
131    pub use crate::system::{object::IObject, valuetype::IValueType};
132}