engage/generated/unity_engine/rendering/universal/
depthoffield.rs1#[cfg(feature = "unity_engine-rendering-universal-depthoffield-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 object_2::{IObject_2, Object_2},
12 rendering::volumecomponent::{IVolumeComponent, VolumeComponent},
13 scriptableobject::{IScriptableObject, ScriptableObject},
14 },
15 };
16
17 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/universal/depthoffield/DepthOfField.md"))]
18 #[::unity::class(namespace = "UnityEngine.Rendering.Universal", name = "DepthOfField")]
19 #[parent(crate::unity_engine::rendering::volumecomponent::VolumeComponent)]
20 pub struct DepthOfField {
21 #[offset(56)]
22 #[rename(name = "mode")]
23 pub mode: crate::unity_engine::rendering::universal::depthoffieldmodeparameter::DepthOfFieldModeParameter,
24 #[offset(64)]
25 #[rename(name = "gaussianStart")]
26 pub gaussian_start: crate::unity_engine::rendering::minfloatparameter::MinFloatParameter,
27 #[offset(72)]
28 #[rename(name = "gaussianEnd")]
29 pub gaussian_end: crate::unity_engine::rendering::minfloatparameter::MinFloatParameter,
30 #[offset(80)]
31 #[rename(name = "gaussianMaxRadius")]
32 pub gaussian_max_radius: crate::unity_engine::rendering::clampedfloatparameter::ClampedFloatParameter,
33 #[offset(88)]
34 #[rename(name = "highQualitySampling")]
35 pub high_quality_sampling: crate::unity_engine::rendering::boolparameter::BoolParameter,
36 #[offset(96)]
37 #[rename(name = "focusDistance")]
38 pub focus_distance: crate::unity_engine::rendering::minfloatparameter::MinFloatParameter,
39 #[offset(104)]
40 #[rename(name = "aperture")]
41 pub aperture: crate::unity_engine::rendering::clampedfloatparameter::ClampedFloatParameter,
42 #[offset(112)]
43 #[rename(name = "focalLength")]
44 pub focal_length: crate::unity_engine::rendering::clampedfloatparameter::ClampedFloatParameter,
45 #[offset(120)]
46 #[rename(name = "bladeCount")]
47 pub blade_count: crate::unity_engine::rendering::clampedintparameter::ClampedIntParameter,
48 #[offset(128)]
49 #[rename(name = "bladeCurvature")]
50 pub blade_curvature: crate::unity_engine::rendering::clampedfloatparameter::ClampedFloatParameter,
51 #[offset(136)]
52 #[rename(name = "bladeRotation")]
53 pub blade_rotation: crate::unity_engine::rendering::clampedfloatparameter::ClampedFloatParameter,
54 }
55}
56
57#[cfg(feature = "unity_engine-rendering-universal-depthoffield-types")]
58pub use __types::*;
59
60#[cfg(feature = "unity_engine-rendering-universal-depthoffield")]
61pub trait IDepthOfFieldMethods: IDepthOfField {
62 #[doc = "`IsActive()` overload"]
63 fn is_active(self) -> bool {
64 unsafe {
65 let __receiver = <DepthOfField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
66 {
67 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
68 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
69 panic!(
70 "unity: virtual slot {}
71 out of range (vtable len {}
72) on the runtime class behind {}
73 (method `{}
74`)",
75 8usize,
76 __vt.len(),
77 <DepthOfField as ::unity::ClassIdentity>::NAME,
78 "IsActive",
79 )
80 });
81 let __inner: extern "C" fn(DepthOfField, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
82 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
83 __inner(__receiver, __mi)
84 }
85 }
86 }
87 #[doc = "`IsTileCompatible()` overload"]
88 fn is_tile_compatible(self) -> bool {
89 unsafe {
90 let __receiver = <DepthOfField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
91 {
92 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
93 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
94 panic!(
95 "unity: virtual slot {}
96 out of range (vtable len {}
97) on the runtime class behind {}
98 (method `{}
99`)",
100 9usize,
101 __vt.len(),
102 <DepthOfField as ::unity::ClassIdentity>::NAME,
103 "IsTileCompatible",
104 )
105 });
106 let __inner: extern "C" fn(DepthOfField, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
107 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
108 __inner(__receiver, __mi)
109 }
110 }
111 }
112 #[doc = "`.ctor()` overload"]
113 fn ctor(self) -> () {
114 unsafe {
115 let __receiver = <DepthOfField as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
116 ::unity::il2cpp_call!((::unity::module_base()+0x2ee79a0usize)as*mut u8,();
117(DepthOfField)__receiver)
118 }
119 }
120}
121
122#[cfg(feature = "unity_engine-rendering-universal-depthoffield")]
123impl<__T: IDepthOfField> IDepthOfFieldMethods for __T {}
124
125#[cfg(feature = "unity_engine-rendering-universal-depthoffield")]
126impl DepthOfField {
127 pub fn is_active_method_info() -> &'static ::unity::il2cpp::MethodInfo {
128 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
129 }
130
131 pub fn is_tile_compatible_method_info() -> &'static ::unity::il2cpp::MethodInfo {
132 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
133 }
134
135 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
136 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
137 }
138}
139
140#[cfg(feature = "unity_engine-rendering-universal-depthoffield")]
141impl DepthOfField {
142 #[doc = "Direct (non-virtual) call to `DepthOfField`'s own `IsActive`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
143 pub unsafe fn is_active(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
144 let __mi = Self::is_active_method_info();
145 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
146 __inner(this.into(), ::core::option::Option::None)
147 }
148
149 #[doc = "Direct (non-virtual) call to `DepthOfField`'s own `IsTileCompatible`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
150 pub unsafe fn is_tile_compatible(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
151 let __mi = Self::is_tile_compatible_method_info();
152 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
153 __inner(this.into(), ::core::option::Option::None)
154 }
155}
156
157#[cfg(feature = "unity_engine-rendering-universal-depthoffield")]
158impl DepthOfField {
159 #[doc = "`.ctor()` — no args"]
160 pub fn new() -> Self {
161 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
162 panic!(
163 "{}
164::{}
165 failed to instantiate",
166 ::core::stringify!(DepthOfField),
167 ::core::stringify!(new),
168 )
169 });
170 <Self as IDepthOfFieldMethods>::ctor(this);
171 this
172 }
173}
174
175#[cfg(feature = "unity_engine-rendering-universal-depthoffield")]
176#[doc(hidden)]
177pub mod prelude {
178 pub use super::{DepthOfField, IDepthOfField, IDepthOfFieldMethods};
179 #[cfg(feature = "system-object")]
180 pub use crate::system::object::IObjectMethods;
181 #[cfg(feature = "unity_engine-object_2")]
182 pub use crate::unity_engine::object_2::IObject_2Methods;
183 #[cfg(feature = "unity_engine-rendering-volumecomponent")]
184 pub use crate::unity_engine::rendering::volumecomponent::IVolumeComponentMethods;
185 #[cfg(feature = "unity_engine-scriptableobject")]
186 pub use crate::unity_engine::scriptableobject::IScriptableObjectMethods;
187 pub use crate::{
188 system::object::IObject,
189 unity_engine::{object_2::IObject_2, rendering::volumecomponent::IVolumeComponent, scriptableobject::IScriptableObject},
190 };
191}