Skip to main content

engage/generated/unity_engine/
raycasthit.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-raycasthit-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/raycasthit/RaycastHit.md"))]
14    #[repr(C)]
15    #[derive(::core::clone::Clone, ::core::marker::Copy)]
16    pub struct RaycastHit {
17        pub m_point: crate::unity_engine::vector3::Vector3,
18        pub m_normal: crate::unity_engine::vector3::Vector3,
19        pub m_face_id: u32,
20        pub m_distance: f32,
21        pub m_uv: crate::unity_engine::vector2::Vector2,
22        pub m_collider: i32,
23    }
24    impl ::unity::ClassIdentity for RaycastHit {
25        const NAME: &'static str = "RaycastHit";
26        const NAMESPACE: &'static str = "UnityEngine";
27
28        fn class() -> ::unity::Class {
29            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
30            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
31        }
32    }
33    impl ::unity::IlType for RaycastHit {
34        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
35            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
36        }
37    }
38}
39
40#[cfg(feature = "unity_engine-raycasthit-types")]
41pub use __types::*;
42
43#[cfg(feature = "unity_engine-raycasthit")]
44impl RaycastHit {
45    #[doc = "`get_collider()` overload"]
46    pub fn get_collider(&mut self) -> crate::unity_engine::collider::Collider {
47        unsafe {
48            ::unity::il2cpp_call!((::unity::module_base()+0x3efd8e0usize)as*mut u8,crate::unity_engine::collider::Collider;
49(*mut RaycastHit)self as*mut RaycastHit)
50        }
51    }
52
53    #[doc = "`get_point()` overload"]
54    pub fn get_point(&mut self) -> crate::unity_engine::vector3::Vector3 {
55        unsafe {
56            ::unity::il2cpp_call!((::unity::module_base()+0x3efd9c0usize)as*mut u8,crate::unity_engine::vector3::Vector3;
57(*mut RaycastHit)self as*mut RaycastHit)
58        }
59    }
60
61    #[doc = "`set_point(crate::unity_engine::vector3::Vector3)` overload"]
62    pub fn set_point(&mut self, value: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
63        unsafe {
64            ::unity::il2cpp_call!((::unity::module_base()+0x3efd9d0usize)as*mut u8,();
65(*mut RaycastHit)self as*mut RaycastHit,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(value))
66        }
67    }
68
69    #[doc = "`get_normal()` overload"]
70    pub fn get_normal(&mut self) -> crate::unity_engine::vector3::Vector3 {
71        unsafe {
72            ::unity::il2cpp_call!((::unity::module_base()+0x3efd9e0usize)as*mut u8,crate::unity_engine::vector3::Vector3;
73(*mut RaycastHit)self as*mut RaycastHit)
74        }
75    }
76
77    #[doc = "`set_normal(crate::unity_engine::vector3::Vector3)` overload"]
78    pub fn set_normal(&mut self, value: impl ::core::convert::Into<crate::unity_engine::vector3::Vector3>) -> () {
79        unsafe {
80            ::unity::il2cpp_call!((::unity::module_base()+0x3efd9f0usize)as*mut u8,();
81(*mut RaycastHit)self as*mut RaycastHit,(crate::unity_engine::vector3::Vector3)::core::convert::Into::into(value))
82        }
83    }
84
85    #[doc = "`get_distance()` overload"]
86    pub fn get_distance(&mut self) -> f32 {
87        unsafe {
88            ::unity::il2cpp_call!((::unity::module_base()+0x3efda00usize)as*mut u8,f32;
89(*mut RaycastHit)self as*mut RaycastHit)
90        }
91    }
92
93    #[doc = "`set_distance(f32)` overload"]
94    pub fn set_distance(&mut self, value: impl ::core::convert::Into<f32>) -> () {
95        unsafe {
96            ::unity::il2cpp_call!((::unity::module_base()+0x3efda10usize)as*mut u8,();
97(*mut RaycastHit)self as*mut RaycastHit,(f32)::core::convert::Into::into(value))
98        }
99    }
100
101    #[doc = "`get_triangleIndex()` overload"]
102    pub fn get_triangle_index(&mut self) -> i32 {
103        unsafe {
104            ::unity::il2cpp_call!((::unity::module_base()+0x3efda20usize)as*mut u8,i32;
105(*mut RaycastHit)self as*mut RaycastHit)
106        }
107    }
108
109    #[doc = "`get_transform()` overload"]
110    pub fn get_transform(&mut self) -> crate::unity_engine::transform::Transform {
111        unsafe {
112            ::unity::il2cpp_call!((::unity::module_base()+0x3efda30usize)as*mut u8,crate::unity_engine::transform::Transform;
113(*mut RaycastHit)self as*mut RaycastHit)
114        }
115    }
116
117    #[doc = "`get_rigidbody()` overload"]
118    pub fn get_rigidbody(&mut self) -> crate::unity_engine::rigidbody::Rigidbody {
119        unsafe {
120            ::unity::il2cpp_call!((::unity::module_base()+0x3efdc50usize)as*mut u8,crate::unity_engine::rigidbody::Rigidbody;
121(*mut RaycastHit)self as*mut RaycastHit)
122        }
123    }
124}
125
126#[cfg(feature = "unity_engine-raycasthit")]
127impl RaycastHit {
128    pub fn get_collider_method_info() -> &'static ::unity::il2cpp::MethodInfo {
129        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
130    }
131
132    pub fn get_point_method_info() -> &'static ::unity::il2cpp::MethodInfo {
133        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
134    }
135
136    pub fn set_point_method_info() -> &'static ::unity::il2cpp::MethodInfo {
137        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
138    }
139
140    pub fn get_normal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
141        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
142    }
143
144    pub fn set_normal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
145        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
146    }
147
148    pub fn get_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
149        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
150    }
151
152    pub fn set_distance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
153        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
154    }
155
156    pub fn get_triangle_index_method_info() -> &'static ::unity::il2cpp::MethodInfo {
157        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
158    }
159
160    pub fn get_transform_method_info() -> &'static ::unity::il2cpp::MethodInfo {
161        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
162    }
163
164    pub fn get_rigidbody_method_info() -> &'static ::unity::il2cpp::MethodInfo {
165        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
166    }
167}
168
169#[cfg(feature = "unity_engine-raycasthit")]
170#[doc(hidden)]
171pub mod prelude {
172    pub use super::RaycastHit;
173    #[cfg(feature = "system-object")]
174    pub use crate::system::object::IObjectMethods;
175    #[cfg(feature = "system-valuetype")]
176    pub use crate::system::valuetype::IValueTypeMethods;
177    pub use crate::system::{object::IObject, valuetype::IValueType};
178}