Skip to main content

engage/generated/unity_engine/
plane.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-plane-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/plane/Plane.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct Plane {
17        pub m_normal: crate::unity_engine::vector3::Vector3,
18        pub m_distance: f32,
19    }
20    impl ::unity::ClassIdentity for Plane {
21        const NAME: &'static str = "Plane";
22        const NAMESPACE: &'static str = "UnityEngine";
23
24        fn class() -> ::unity::Class {
25            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
26            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
27        }
28    }
29    impl ::unity::IlType for Plane {
30        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
31            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
32        }
33    }
34}
35
36#[cfg(feature = "unity_engine-plane-types")]
37pub use __types::*;
38
39#[cfg(feature = "unity_engine-plane")]
40impl Plane {
41    #[doc = "`get_normal()` overload"]
42    pub fn get_normal(&mut self) -> crate::unity_engine::vector3::Vector3 {
43        unsafe {
44            ::unity::il2cpp_call!((::unity::module_base()+0x32f11b0usize)as*mut u8,crate::unity_engine::vector3::Vector3;
45(*mut Plane)self as*mut Plane)
46        }
47    }
48
49    #[doc = "`get_distance()` overload"]
50    pub fn get_distance(&mut self) -> f32 {
51        unsafe {
52            ::unity::il2cpp_call!((::unity::module_base()+0x32f11c0usize)as*mut u8,f32;
53(*mut Plane)self as*mut Plane)
54        }
55    }
56
57    #[doc = "`.ctor(crate::unity_engine::vector3::Vector3, crate::unity_engine::vector3::Vector3)` overload"]
58    pub fn ctor(
59        &mut self,
60        in_normal: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
61        in_point: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>,
62    ) -> () {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x32f11d0usize)as*mut u8,();
65(*mut Plane)self as*mut Plane,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(in_normal),(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(in_point))
66        }
67    }
68
69    #[doc = "`Raycast(crate::unity_engine::ray::Ray, *mutf32)` overload"]
70    pub fn raycast(&mut self, ray: impl ::core::convert::Into<crate::unity_engine::ray::Ray>) -> (bool, f32) {
71        unsafe {
72            let mut __out_0 = ::core::mem::MaybeUninit::<f32>::uninit();
73            let __ret = {
74                ::unity::il2cpp_call!((::unity::module_base()+0x32f1240usize)as*mut u8,bool;
75(*mut Plane)self as*mut Plane,(crate::unity_engine::ray::Ray)::core::convert::Into::into(ray),(*mut f32)__out_0.as_mut_ptr())
76            };
77            (__ret, __out_0.assume_init())
78        }
79    }
80
81    #[doc = "`ToString()` overload"]
82    pub fn to_string(&mut self) -> ::unity::Il2CppString {
83        unsafe {
84            ::unity::il2cpp_call!((::unity::module_base()+0x32f1380usize)as*mut u8, ::unity::Il2CppString;
85(*mut Plane)self as*mut Plane)
86        }
87    }
88}
89
90#[cfg(feature = "unity_engine-plane")]
91impl Plane {
92    pub fn get_normal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
93        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
94    }
95
96    pub fn get_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
97        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
98    }
99
100    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
101        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
102    }
103
104    pub fn raycast_method_info() -> &'static ::unity::il2cpp::MethodInfo {
105        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
106    }
107
108    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
109        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
110    }
111}
112
113#[cfg(feature = "unity_engine-plane")]
114#[doc(hidden)]
115pub mod prelude {
116    pub use super::Plane;
117    #[cfg(feature = "system-object")]
118    pub use crate::system::object::IObjectMethods;
119    #[cfg(feature = "system-valuetype")]
120    pub use crate::system::valuetype::IValueTypeMethods;
121    pub use crate::system::{object::IObject, valuetype::IValueType};
122}