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