engage/generated/unity_engine/rendering/
colorutils.rs1#[cfg(feature = "unity_engine-rendering-colorutils-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/colorutils/ColorUtils.md"))]
11 #[::unity::class(namespace = "UnityEngine.Rendering", name = "ColorUtils")]
12 #[parent(crate::system::object::Object)]
13 pub struct ColorUtils {
14 #[static_field]
15 #[rename(name = "s_LightMeterCalibrationConstant")]
16 pub s_light_meter_calibration_constant: f32,
17 #[static_field]
18 #[rename(name = "s_LensAttenuation")]
19 pub s_lens_attenuation: f32,
20 }
21}
22
23#[cfg(feature = "unity_engine-rendering-colorutils-types")]
24pub use __types::*;
25
26#[cfg(feature = "unity_engine-rendering-colorutils")]
27impl ColorUtils {
28 #[doc = "`get_lensImperfectionExposureScale()` overload"]
29 pub fn get_lens_imperfection_exposure_scale() -> f32 {
30 unsafe {
31 ::unity::il2cpp_call!((::unity::module_base()+0x352f850usize)as*mut u8,f32;
32 )
33 }
34 }
35
36 #[doc = "`StandardIlluminantY(f32)` overload"]
37 pub fn standard_illuminant_y(x: impl ::core::convert::Into<f32>) -> f32 {
38 unsafe {
39 ::unity::il2cpp_call!((::unity::module_base()+0x352f8d0usize)as*mut u8,f32;
40(f32)::core::convert::Into::into(x))
41 }
42 }
43
44 #[doc = "`CIExyToLMS(f32, f32)` overload"]
45 pub fn ci_exy_to_lms(x: impl ::core::convert::Into<f32>, y: impl ::core::convert::Into<f32>) -> crate::unity_engine::vector3::Vector3 {
46 unsafe {
47 ::unity::il2cpp_call!((::unity::module_base()+0x352f910usize)as*mut u8,crate::unity_engine::vector3::Vector3;
48(f32)::core::convert::Into::into(x),(f32)::core::convert::Into::into(y))
49 }
50 }
51
52 #[doc = "`ColorBalanceToLMSCoeffs(f32, f32)` overload"]
53 pub fn color_balance_to_lms_coeffs(
54 temperature: impl ::core::convert::Into<f32>,
55 tint: impl ::core::convert::Into<f32>,
56 ) -> crate::unity_engine::vector3::Vector3 {
57 unsafe {
58 ::unity::il2cpp_call!((::unity::module_base()+0x352f9d0usize)as*mut u8,crate::unity_engine::vector3::Vector3;
59(f32)::core::convert::Into::into(temperature),(f32)::core::convert::Into::into(tint))
60 }
61 }
62
63 #[doc = "`Luminance(*mutcrate::unity_engine::color::Color)` overload"]
64 pub fn luminance() -> (f32, crate::unity_engine::color::Color) {
65 unsafe {
66 let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::color::Color>::uninit();
67 let __ret = {
68 ::unity::il2cpp_call!((::unity::module_base()+0x3530140usize)as*mut u8,f32;
69(*mut crate::unity_engine::color::Color)__out_0.as_mut_ptr())
70 };
71 (__ret, __out_0.assume_init())
72 }
73 }
74
75 #[doc = "`ComputeEV100(f32, f32, f32)` overload"]
76 pub fn compute_ev100(
77 aperture: impl ::core::convert::Into<f32>,
78 shutter_speed: impl ::core::convert::Into<f32>,
79 iso: impl ::core::convert::Into<f32>,
80 ) -> f32 {
81 unsafe {
82 ::unity::il2cpp_call!((::unity::module_base()+0x3530230usize)as*mut u8,f32;
83(f32)::core::convert::Into::into(aperture),(f32)::core::convert::Into::into(shutter_speed),(f32)::core::convert::Into::into(iso))
84 }
85 }
86
87 #[doc = "`ConvertEV100ToExposure(f32)` overload"]
88 pub fn convert_ev100_to_exposure(ev100: impl ::core::convert::Into<f32>) -> f32 {
89 unsafe {
90 ::unity::il2cpp_call!((::unity::module_base()+0x3530260usize)as*mut u8,f32;
91(f32)::core::convert::Into::into(ev100))
92 }
93 }
94
95 #[doc = "`ConvertExposureToEV100(f32)` overload"]
96 pub fn convert_exposure_to_ev100(exposure: impl ::core::convert::Into<f32>) -> f32 {
97 unsafe {
98 ::unity::il2cpp_call!((::unity::module_base()+0x3530350usize)as*mut u8,f32;
99(f32)::core::convert::Into::into(exposure))
100 }
101 }
102
103 #[doc = "`ComputeEV100FromAvgLuminance(f32)` overload"]
104 pub fn compute_ev100_from_avg_luminance(avg_luminance: impl ::core::convert::Into<f32>) -> f32 {
105 unsafe {
106 ::unity::il2cpp_call!((::unity::module_base()+0x3530440usize)as*mut u8,f32;
107(f32)::core::convert::Into::into(avg_luminance))
108 }
109 }
110
111 #[doc = "`ComputeISO(f32, f32, f32)` overload"]
112 pub fn compute_iso(
113 aperture: impl ::core::convert::Into<f32>,
114 shutter_speed: impl ::core::convert::Into<f32>,
115 target_ev100: impl ::core::convert::Into<f32>,
116 ) -> f32 {
117 unsafe {
118 ::unity::il2cpp_call!((::unity::module_base()+0x35304d0usize)as*mut u8,f32;
119(f32)::core::convert::Into::into(aperture),(f32)::core::convert::Into::into(shutter_speed),(f32)::core::convert::Into::into(target_ev100))
120 }
121 }
122
123 #[doc = "`ToHex(crate::unity_engine::color::Color)` overload"]
124 pub fn to_hex(c: impl ::core::convert::Into<crate::unity_engine::color::Color>) -> u32 {
125 unsafe {
126 ::unity::il2cpp_call!((::unity::module_base()+0x3530510usize)as*mut u8,u32;
127(crate::unity_engine::color::Color)::core::convert::Into::into(c))
128 }
129 }
130
131 #[doc = "`ToRGBA(u32)` overload"]
132 pub fn to_rgba(hex: impl ::core::convert::Into<u32>) -> crate::unity_engine::color::Color {
133 unsafe {
134 ::unity::il2cpp_call!((::unity::module_base()+0x3530580usize)as*mut u8,crate::unity_engine::color::Color;
135(u32)::core::convert::Into::into(hex))
136 }
137 }
138
139 #[doc = "`.cctor()` overload"]
140 pub fn cctor() -> () {
141 unsafe {
142 ::unity::il2cpp_call!((::unity::module_base()+0x3530600usize)as*mut u8,();
143 )
144 }
145 }
146}
147
148#[cfg(feature = "unity_engine-rendering-colorutils")]
149impl ColorUtils {
150 pub fn get_lens_imperfection_exposure_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
151 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
152 }
153
154 pub fn standard_illuminant_y_method_info() -> &'static ::unity::il2cpp::MethodInfo {
155 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
156 }
157
158 pub fn ci_exy_to_lms_method_info() -> &'static ::unity::il2cpp::MethodInfo {
159 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
160 }
161
162 pub fn color_balance_to_lms_coeffs_method_info() -> &'static ::unity::il2cpp::MethodInfo {
163 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
164 }
165
166 pub fn luminance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
167 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
168 }
169
170 pub fn compute_ev100_method_info() -> &'static ::unity::il2cpp::MethodInfo {
171 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
172 }
173
174 pub fn convert_ev100_to_exposure_method_info() -> &'static ::unity::il2cpp::MethodInfo {
175 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
176 }
177
178 pub fn convert_exposure_to_ev100_method_info() -> &'static ::unity::il2cpp::MethodInfo {
179 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
180 }
181
182 pub fn compute_ev100_from_avg_luminance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
183 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
184 }
185
186 pub fn compute_iso_method_info() -> &'static ::unity::il2cpp::MethodInfo {
187 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
188 }
189
190 pub fn to_hex_method_info() -> &'static ::unity::il2cpp::MethodInfo {
191 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
192 }
193
194 pub fn to_rgba_method_info() -> &'static ::unity::il2cpp::MethodInfo {
195 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
196 }
197
198 pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
199 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
200 }
201}
202
203#[cfg(feature = "unity_engine-rendering-colorutils")]
204#[doc(hidden)]
205pub mod prelude {
206 pub use super::{ColorUtils, IColorUtils};
207 pub use crate::system::object::IObject;
208 #[cfg(feature = "system-object")]
209 pub use crate::system::object::IObjectMethods;
210}