pub struct Environment { /* private fields */ }
Expand description
core class Environment
inherits Resource
(reference counted).
§Official documentation
See the documentation of this class in the Godot engine’s official documentation.
§Memory management
The lifetime of this object is automatically managed through reference counting.
§Feature flag
This type is behind the gdnative crate’s common
feature flag.
§Class hierarchy
Environment inherits methods from:
Implementations§
Source§impl Environment
impl Environment
pub fn new() -> Self
pub fn set_background(&mut self, mode: i64)
pub fn set_sky(&mut self, sky: Option<Sky>)
pub fn set_sky_custom_fov(&mut self, scale: f64)
pub fn set_bg_color(&mut self, color: Color)
pub fn set_bg_energy(&mut self, energy: f64)
pub fn set_canvas_max_layer(&mut self, layer: i64)
pub fn set_ambient_light_color(&mut self, color: Color)
pub fn set_ambient_light_energy(&mut self, energy: f64)
pub fn set_ambient_light_sky_contribution(&mut self, energy: f64)
pub fn get_background(&self) -> EnvironmentBGMode
pub fn get_sky(&self) -> Option<Sky>
pub fn get_sky_custom_fov(&self) -> f64
pub fn get_bg_color(&self) -> Color
pub fn get_bg_energy(&self) -> f64
pub fn get_canvas_max_layer(&self) -> i64
pub fn get_ambient_light_color(&self) -> Color
pub fn get_ambient_light_energy(&self) -> f64
pub fn get_ambient_light_sky_contribution(&self) -> f64
pub fn set_fog_enabled(&mut self, enabled: bool)
pub fn is_fog_enabled(&self) -> bool
pub fn set_fog_color(&mut self, color: Color)
pub fn get_fog_color(&self) -> Color
pub fn set_fog_sun_color(&mut self, color: Color)
pub fn get_fog_sun_color(&self) -> Color
pub fn set_fog_sun_amount(&mut self, amount: f64)
pub fn get_fog_sun_amount(&self) -> f64
pub fn set_fog_depth_enabled(&mut self, enabled: bool)
pub fn is_fog_depth_enabled(&self) -> bool
pub fn set_fog_depth_begin(&mut self, distance: f64)
pub fn get_fog_depth_begin(&self) -> f64
pub fn set_fog_depth_curve(&mut self, curve: f64)
pub fn get_fog_depth_curve(&self) -> f64
pub fn set_fog_transmit_enabled(&mut self, enabled: bool)
pub fn is_fog_transmit_enabled(&self) -> bool
pub fn set_fog_transmit_curve(&mut self, curve: f64)
pub fn get_fog_transmit_curve(&self) -> f64
pub fn set_fog_height_enabled(&mut self, enabled: bool)
pub fn is_fog_height_enabled(&self) -> bool
pub fn set_fog_height_min(&mut self, height: f64)
pub fn get_fog_height_min(&self) -> f64
pub fn set_fog_height_max(&mut self, height: f64)
pub fn get_fog_height_max(&self) -> f64
pub fn set_fog_height_curve(&mut self, curve: f64)
pub fn get_fog_height_curve(&self) -> f64
pub fn set_tonemapper(&mut self, mode: i64)
pub fn get_tonemapper(&self) -> EnvironmentToneMapper
pub fn set_tonemap_exposure(&mut self, exposure: f64)
pub fn get_tonemap_exposure(&self) -> f64
pub fn set_tonemap_white(&mut self, white: f64)
pub fn get_tonemap_white(&self) -> f64
pub fn set_tonemap_auto_exposure(&mut self, auto_exposure: bool)
pub fn get_tonemap_auto_exposure(&self) -> bool
pub fn set_tonemap_auto_exposure_max(&mut self, exposure_max: f64)
pub fn get_tonemap_auto_exposure_max(&self) -> f64
pub fn set_tonemap_auto_exposure_min(&mut self, exposure_min: f64)
pub fn get_tonemap_auto_exposure_min(&self) -> f64
pub fn set_tonemap_auto_exposure_speed(&mut self, exposure_speed: f64)
pub fn get_tonemap_auto_exposure_speed(&self) -> f64
pub fn set_tonemap_auto_exposure_grey(&mut self, exposure_grey: f64)
pub fn get_tonemap_auto_exposure_grey(&self) -> f64
pub fn set_ssr_enabled(&mut self, enabled: bool)
pub fn is_ssr_enabled(&self) -> bool
pub fn set_ssr_max_steps(&mut self, max_steps: i64)
pub fn get_ssr_max_steps(&self) -> i64
pub fn set_ssr_fade_in(&mut self, fade_in: f64)
pub fn get_ssr_fade_in(&self) -> f64
pub fn set_ssr_fade_out(&mut self, fade_out: f64)
pub fn get_ssr_fade_out(&self) -> f64
pub fn set_ssr_depth_tolerance(&mut self, depth_tolerance: f64)
pub fn get_ssr_depth_tolerance(&self) -> f64
pub fn set_ssr_rough(&mut self, rough: bool)
pub fn is_ssr_rough(&self) -> bool
pub fn set_ssao_enabled(&mut self, enabled: bool)
pub fn is_ssao_enabled(&self) -> bool
pub fn set_ssao_radius(&mut self, radius: f64)
pub fn get_ssao_radius(&self) -> f64
pub fn set_ssao_intensity(&mut self, intensity: f64)
pub fn get_ssao_intensity(&self) -> f64
pub fn set_ssao_radius2(&mut self, radius: f64)
pub fn get_ssao_radius2(&self) -> f64
pub fn set_ssao_intensity2(&mut self, intensity: f64)
pub fn get_ssao_intensity2(&self) -> f64
pub fn set_ssao_bias(&mut self, bias: f64)
pub fn get_ssao_bias(&self) -> f64
pub fn set_ssao_direct_light_affect(&mut self, amount: f64)
pub fn get_ssao_direct_light_affect(&self) -> f64
pub fn set_ssao_ao_channel_affect(&mut self, amount: f64)
pub fn get_ssao_ao_channel_affect(&self) -> f64
pub fn set_ssao_color(&mut self, color: Color)
pub fn get_ssao_color(&self) -> Color
pub fn set_ssao_blur(&mut self, mode: i64)
pub fn get_ssao_blur(&self) -> EnvironmentSSAOBlur
pub fn set_ssao_quality(&mut self, quality: i64)
pub fn get_ssao_quality(&self) -> EnvironmentSSAOQuality
pub fn set_ssao_edge_sharpness(&mut self, edge_sharpness: f64)
pub fn get_ssao_edge_sharpness(&self) -> f64
pub fn set_dof_blur_far_enabled(&mut self, enabled: bool)
pub fn is_dof_blur_far_enabled(&self) -> bool
pub fn set_dof_blur_far_distance(&mut self, intensity: f64)
pub fn get_dof_blur_far_distance(&self) -> f64
pub fn set_dof_blur_far_transition(&mut self, intensity: f64)
pub fn get_dof_blur_far_transition(&self) -> f64
pub fn set_dof_blur_far_amount(&mut self, intensity: f64)
pub fn get_dof_blur_far_amount(&self) -> f64
pub fn set_dof_blur_far_quality(&mut self, intensity: i64)
pub fn get_dof_blur_far_quality(&self) -> EnvironmentDOFBlurQuality
pub fn set_dof_blur_near_enabled(&mut self, enabled: bool)
pub fn is_dof_blur_near_enabled(&self) -> bool
pub fn set_dof_blur_near_distance(&mut self, intensity: f64)
pub fn get_dof_blur_near_distance(&self) -> f64
pub fn set_dof_blur_near_transition(&mut self, intensity: f64)
pub fn get_dof_blur_near_transition(&self) -> f64
pub fn set_dof_blur_near_amount(&mut self, intensity: f64)
pub fn get_dof_blur_near_amount(&self) -> f64
pub fn set_dof_blur_near_quality(&mut self, level: i64)
pub fn get_dof_blur_near_quality(&self) -> EnvironmentDOFBlurQuality
pub fn set_glow_enabled(&mut self, enabled: bool)
pub fn is_glow_enabled(&self) -> bool
pub fn set_glow_level(&mut self, idx: i64, enabled: bool)
pub fn is_glow_level_enabled(&self, idx: i64) -> bool
pub fn set_glow_intensity(&mut self, intensity: f64)
pub fn get_glow_intensity(&self) -> f64
pub fn set_glow_strength(&mut self, strength: f64)
pub fn get_glow_strength(&self) -> f64
pub fn set_glow_bloom(&mut self, amount: f64)
pub fn get_glow_bloom(&self) -> f64
pub fn set_glow_blend_mode(&mut self, mode: i64)
pub fn get_glow_blend_mode(&self) -> EnvironmentGlowBlendMode
pub fn set_glow_hdr_bleed_threshold(&mut self, threshold: f64)
pub fn get_glow_hdr_bleed_threshold(&self) -> f64
pub fn set_glow_hdr_bleed_scale(&mut self, scale: f64)
pub fn get_glow_hdr_bleed_scale(&self) -> f64
pub fn set_glow_bicubic_upscale(&mut self, enabled: bool)
pub fn is_glow_bicubic_upscale_enabled(&self) -> bool
pub fn set_adjustment_enable(&mut self, enabled: bool)
pub fn is_adjustment_enabled(&self) -> bool
pub fn set_adjustment_brightness(&mut self, brightness: f64)
pub fn get_adjustment_brightness(&self) -> f64
pub fn set_adjustment_contrast(&mut self, contrast: f64)
pub fn get_adjustment_contrast(&self) -> f64
pub fn set_adjustment_saturation(&mut self, saturation: f64)
pub fn get_adjustment_saturation(&self) -> f64
pub fn set_adjustment_color_correction( &mut self, color_correction: Option<Texture>, )
pub fn get_adjustment_color_correction(&self) -> Option<Texture>
Sourcepub fn _setup_local_to_scene(&mut self)
pub fn _setup_local_to_scene(&mut self)
Inherited from Resource.
Sourcepub fn set_path(&mut self, path: GodotString)
pub fn set_path(&mut self, path: GodotString)
Inherited from Resource.
Sourcepub fn take_over_path(&mut self, path: GodotString)
pub fn take_over_path(&mut self, path: GodotString)
Inherited from Resource.
Sourcepub fn get_path(&self) -> GodotString
pub fn get_path(&self) -> GodotString
Inherited from Resource.
Sourcepub fn set_name(&mut self, name: GodotString)
pub fn set_name(&mut self, name: GodotString)
Inherited from Resource.
Sourcepub fn get_name(&self) -> GodotString
pub fn get_name(&self) -> GodotString
Inherited from Resource.
Sourcepub fn set_local_to_scene(&mut self, enable: bool)
pub fn set_local_to_scene(&mut self, enable: bool)
Inherited from Resource.
Sourcepub fn is_local_to_scene(&self) -> bool
pub fn is_local_to_scene(&self) -> bool
Inherited from Resource.
Sourcepub fn get_local_scene(&self) -> Option<Node>
pub fn get_local_scene(&self) -> Option<Node>
Inherited from Resource.
Sourcepub fn setup_local_to_scene(&mut self)
pub fn setup_local_to_scene(&mut self)
Inherited from Resource.
Sourcepub fn _notification(&mut self, what: i64)
pub fn _notification(&mut self, what: i64)
Inherited from Object.
Sourcepub fn _get(&mut self, property: GodotString) -> Variant
pub fn _get(&mut self, property: GodotString) -> Variant
Inherited from Object.
Sourcepub fn _get_property_list(&mut self) -> VariantArray
pub fn _get_property_list(&mut self) -> VariantArray
Inherited from Object.
Sourcepub fn get_class(&self) -> GodotString
pub fn get_class(&self) -> GodotString
Inherited from Object.
Sourcepub fn is_class(&self, _type: GodotString) -> bool
pub fn is_class(&self, _type: GodotString) -> bool
Inherited from Object.
Sourcepub fn set(&mut self, property: GodotString, value: Variant)
pub fn set(&mut self, property: GodotString, value: Variant)
Inherited from Object.
Sourcepub fn get(&self, property: GodotString) -> Variant
pub fn get(&self, property: GodotString) -> Variant
Inherited from Object.
Sourcepub fn set_indexed(&mut self, property: NodePath, value: Variant)
pub fn set_indexed(&mut self, property: NodePath, value: Variant)
Inherited from Object.
Sourcepub fn get_indexed(&self, property: NodePath) -> Variant
pub fn get_indexed(&self, property: NodePath) -> Variant
Inherited from Object.
Sourcepub fn get_property_list(&self) -> VariantArray
pub fn get_property_list(&self) -> VariantArray
Inherited from Object.
Sourcepub fn get_method_list(&self) -> VariantArray
pub fn get_method_list(&self) -> VariantArray
Inherited from Object.
Sourcepub fn notification(&mut self, what: i64, reversed: bool)
pub fn notification(&mut self, what: i64, reversed: bool)
Inherited from Object.
Sourcepub fn get_instance_id(&self) -> i64
pub fn get_instance_id(&self) -> i64
Inherited from Object.
Sourcepub fn set_script(&mut self, script: Option<Reference>)
pub fn set_script(&mut self, script: Option<Reference>)
Inherited from Object.
Sourcepub fn get_script(&self) -> Option<Reference>
pub fn get_script(&self) -> Option<Reference>
Inherited from Object.
Sourcepub fn set_meta(&mut self, name: GodotString, value: Variant)
pub fn set_meta(&mut self, name: GodotString, value: Variant)
Inherited from Object.
Sourcepub fn get_meta(&self, name: GodotString) -> Variant
pub fn get_meta(&self, name: GodotString) -> Variant
Inherited from Object.
Sourcepub fn has_meta(&self, name: GodotString) -> bool
pub fn has_meta(&self, name: GodotString) -> bool
Inherited from Object.
Sourcepub fn get_meta_list(&self) -> StringArray
pub fn get_meta_list(&self) -> StringArray
Inherited from Object.
Sourcepub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray)
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray)
Inherited from Object.
Sourcepub fn has_user_signal(&self, signal: GodotString) -> bool
pub fn has_user_signal(&self, signal: GodotString) -> bool
Inherited from Object.
Sourcepub fn emit_signal(
&mut self,
signal: GodotString,
varargs: &[Variant],
) -> Variant
pub fn emit_signal( &mut self, signal: GodotString, varargs: &[Variant], ) -> Variant
Inherited from Object.
Sourcepub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant
Inherited from Object.
Sourcepub fn call_deferred(
&mut self,
method: GodotString,
varargs: &[Variant],
) -> Variant
pub fn call_deferred( &mut self, method: GodotString, varargs: &[Variant], ) -> Variant
Inherited from Object.
Sourcepub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant
Inherited from Object.
Sourcepub fn has_method(&self, method: GodotString) -> bool
pub fn has_method(&self, method: GodotString) -> bool
Inherited from Object.
Sourcepub fn get_signal_list(&self) -> VariantArray
pub fn get_signal_list(&self) -> VariantArray
Inherited from Object.
Sourcepub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray
Inherited from Object.
Sourcepub fn get_incoming_connections(&self) -> VariantArray
pub fn get_incoming_connections(&self) -> VariantArray
Inherited from Object.
Sourcepub fn connect(
&mut self,
signal: GodotString,
target: Option<Object>,
method: GodotString,
binds: VariantArray,
flags: i64,
) -> GodotResult
pub fn connect( &mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64, ) -> GodotResult
Inherited from Object.
Sourcepub fn disconnect(
&mut self,
signal: GodotString,
target: Option<Object>,
method: GodotString,
)
pub fn disconnect( &mut self, signal: GodotString, target: Option<Object>, method: GodotString, )
Inherited from Object.
Sourcepub fn is_connected(
&self,
signal: GodotString,
target: Option<Object>,
method: GodotString,
) -> bool
pub fn is_connected( &self, signal: GodotString, target: Option<Object>, method: GodotString, ) -> bool
Inherited from Object.
Sourcepub fn set_block_signals(&mut self, enable: bool)
pub fn set_block_signals(&mut self, enable: bool)
Inherited from Object.
Sourcepub fn is_blocking_signals(&self) -> bool
pub fn is_blocking_signals(&self) -> bool
Inherited from Object.
Sourcepub fn property_list_changed_notify(&mut self)
pub fn property_list_changed_notify(&mut self)
Inherited from Object.
Sourcepub fn set_message_translation(&mut self, enable: bool)
pub fn set_message_translation(&mut self, enable: bool)
Inherited from Object.
Sourcepub fn can_translate_messages(&self) -> bool
pub fn can_translate_messages(&self) -> bool
Inherited from Object.
Sourcepub fn tr(&self, message: GodotString) -> GodotString
pub fn tr(&self, message: GodotString) -> GodotString
Inherited from Object.
Sourcepub fn is_queued_for_deletion(&self) -> bool
pub fn is_queued_for_deletion(&self) -> bool
Inherited from Object.
Sourcepub fn to_resource(&self) -> Resource
pub fn to_resource(&self) -> Resource
Up-cast.
Sourcepub fn to_reference(&self) -> Reference
pub fn to_reference(&self) -> Reference
Up-cast.
Sourcepub fn cast<T: GodotObject>(&self) -> Option<T>
pub fn cast<T: GodotObject>(&self) -> Option<T>
Generic dynamic cast.