Struct Environment

Source
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

Source

pub fn new() -> Self

Source

pub fn new_ref(&self) -> Self

Creates a new reference to the same reference-counted object.

Source

pub fn set_background(&mut self, mode: i64)

Source

pub fn set_sky(&mut self, sky: Option<Sky>)

Source

pub fn set_sky_custom_fov(&mut self, scale: f64)

Source

pub fn set_bg_color(&mut self, color: Color)

Source

pub fn set_bg_energy(&mut self, energy: f64)

Source

pub fn set_canvas_max_layer(&mut self, layer: i64)

Source

pub fn set_ambient_light_color(&mut self, color: Color)

Source

pub fn set_ambient_light_energy(&mut self, energy: f64)

Source

pub fn set_ambient_light_sky_contribution(&mut self, energy: f64)

Source

pub fn get_background(&self) -> EnvironmentBGMode

Source

pub fn get_sky(&self) -> Option<Sky>

Source

pub fn get_sky_custom_fov(&self) -> f64

Source

pub fn get_bg_color(&self) -> Color

Source

pub fn get_bg_energy(&self) -> f64

Source

pub fn get_canvas_max_layer(&self) -> i64

Source

pub fn get_ambient_light_color(&self) -> Color

Source

pub fn get_ambient_light_energy(&self) -> f64

Source

pub fn get_ambient_light_sky_contribution(&self) -> f64

Source

pub fn set_fog_enabled(&mut self, enabled: bool)

Source

pub fn is_fog_enabled(&self) -> bool

Source

pub fn set_fog_color(&mut self, color: Color)

Source

pub fn get_fog_color(&self) -> Color

Source

pub fn set_fog_sun_color(&mut self, color: Color)

Source

pub fn get_fog_sun_color(&self) -> Color

Source

pub fn set_fog_sun_amount(&mut self, amount: f64)

Source

pub fn get_fog_sun_amount(&self) -> f64

Source

pub fn set_fog_depth_enabled(&mut self, enabled: bool)

Source

pub fn is_fog_depth_enabled(&self) -> bool

Source

pub fn set_fog_depth_begin(&mut self, distance: f64)

Source

pub fn get_fog_depth_begin(&self) -> f64

Source

pub fn set_fog_depth_curve(&mut self, curve: f64)

Source

pub fn get_fog_depth_curve(&self) -> f64

Source

pub fn set_fog_transmit_enabled(&mut self, enabled: bool)

Source

pub fn is_fog_transmit_enabled(&self) -> bool

Source

pub fn set_fog_transmit_curve(&mut self, curve: f64)

Source

pub fn get_fog_transmit_curve(&self) -> f64

Source

pub fn set_fog_height_enabled(&mut self, enabled: bool)

Source

pub fn is_fog_height_enabled(&self) -> bool

Source

pub fn set_fog_height_min(&mut self, height: f64)

Source

pub fn get_fog_height_min(&self) -> f64

Source

pub fn set_fog_height_max(&mut self, height: f64)

Source

pub fn get_fog_height_max(&self) -> f64

Source

pub fn set_fog_height_curve(&mut self, curve: f64)

Source

pub fn get_fog_height_curve(&self) -> f64

Source

pub fn set_tonemapper(&mut self, mode: i64)

Source

pub fn get_tonemapper(&self) -> EnvironmentToneMapper

Source

pub fn set_tonemap_exposure(&mut self, exposure: f64)

Source

pub fn get_tonemap_exposure(&self) -> f64

Source

pub fn set_tonemap_white(&mut self, white: f64)

Source

pub fn get_tonemap_white(&self) -> f64

Source

pub fn set_tonemap_auto_exposure(&mut self, auto_exposure: bool)

Source

pub fn get_tonemap_auto_exposure(&self) -> bool

Source

pub fn set_tonemap_auto_exposure_max(&mut self, exposure_max: f64)

Source

pub fn get_tonemap_auto_exposure_max(&self) -> f64

Source

pub fn set_tonemap_auto_exposure_min(&mut self, exposure_min: f64)

Source

pub fn get_tonemap_auto_exposure_min(&self) -> f64

Source

pub fn set_tonemap_auto_exposure_speed(&mut self, exposure_speed: f64)

Source

pub fn get_tonemap_auto_exposure_speed(&self) -> f64

Source

pub fn set_tonemap_auto_exposure_grey(&mut self, exposure_grey: f64)

Source

pub fn get_tonemap_auto_exposure_grey(&self) -> f64

Source

pub fn set_ssr_enabled(&mut self, enabled: bool)

Source

pub fn is_ssr_enabled(&self) -> bool

Source

pub fn set_ssr_max_steps(&mut self, max_steps: i64)

Source

pub fn get_ssr_max_steps(&self) -> i64

Source

pub fn set_ssr_fade_in(&mut self, fade_in: f64)

Source

pub fn get_ssr_fade_in(&self) -> f64

Source

pub fn set_ssr_fade_out(&mut self, fade_out: f64)

Source

pub fn get_ssr_fade_out(&self) -> f64

Source

pub fn set_ssr_depth_tolerance(&mut self, depth_tolerance: f64)

Source

pub fn get_ssr_depth_tolerance(&self) -> f64

Source

pub fn set_ssr_rough(&mut self, rough: bool)

Source

pub fn is_ssr_rough(&self) -> bool

Source

pub fn set_ssao_enabled(&mut self, enabled: bool)

Source

pub fn is_ssao_enabled(&self) -> bool

Source

pub fn set_ssao_radius(&mut self, radius: f64)

Source

pub fn get_ssao_radius(&self) -> f64

Source

pub fn set_ssao_intensity(&mut self, intensity: f64)

Source

pub fn get_ssao_intensity(&self) -> f64

Source

pub fn set_ssao_radius2(&mut self, radius: f64)

Source

pub fn get_ssao_radius2(&self) -> f64

Source

pub fn set_ssao_intensity2(&mut self, intensity: f64)

Source

pub fn get_ssao_intensity2(&self) -> f64

Source

pub fn set_ssao_bias(&mut self, bias: f64)

Source

pub fn get_ssao_bias(&self) -> f64

Source

pub fn set_ssao_direct_light_affect(&mut self, amount: f64)

Source

pub fn get_ssao_direct_light_affect(&self) -> f64

Source

pub fn set_ssao_ao_channel_affect(&mut self, amount: f64)

Source

pub fn get_ssao_ao_channel_affect(&self) -> f64

Source

pub fn set_ssao_color(&mut self, color: Color)

Source

pub fn get_ssao_color(&self) -> Color

Source

pub fn set_ssao_blur(&mut self, mode: i64)

Source

pub fn get_ssao_blur(&self) -> EnvironmentSSAOBlur

Source

pub fn set_ssao_quality(&mut self, quality: i64)

Source

pub fn get_ssao_quality(&self) -> EnvironmentSSAOQuality

Source

pub fn set_ssao_edge_sharpness(&mut self, edge_sharpness: f64)

Source

pub fn get_ssao_edge_sharpness(&self) -> f64

Source

pub fn set_dof_blur_far_enabled(&mut self, enabled: bool)

Source

pub fn is_dof_blur_far_enabled(&self) -> bool

Source

pub fn set_dof_blur_far_distance(&mut self, intensity: f64)

Source

pub fn get_dof_blur_far_distance(&self) -> f64

Source

pub fn set_dof_blur_far_transition(&mut self, intensity: f64)

Source

pub fn get_dof_blur_far_transition(&self) -> f64

Source

pub fn set_dof_blur_far_amount(&mut self, intensity: f64)

Source

pub fn get_dof_blur_far_amount(&self) -> f64

Source

pub fn set_dof_blur_far_quality(&mut self, intensity: i64)

Source

pub fn get_dof_blur_far_quality(&self) -> EnvironmentDOFBlurQuality

Source

pub fn set_dof_blur_near_enabled(&mut self, enabled: bool)

Source

pub fn is_dof_blur_near_enabled(&self) -> bool

Source

pub fn set_dof_blur_near_distance(&mut self, intensity: f64)

Source

pub fn get_dof_blur_near_distance(&self) -> f64

Source

pub fn set_dof_blur_near_transition(&mut self, intensity: f64)

Source

pub fn get_dof_blur_near_transition(&self) -> f64

Source

pub fn set_dof_blur_near_amount(&mut self, intensity: f64)

Source

pub fn get_dof_blur_near_amount(&self) -> f64

Source

pub fn set_dof_blur_near_quality(&mut self, level: i64)

Source

pub fn get_dof_blur_near_quality(&self) -> EnvironmentDOFBlurQuality

Source

pub fn set_glow_enabled(&mut self, enabled: bool)

Source

pub fn is_glow_enabled(&self) -> bool

Source

pub fn set_glow_level(&mut self, idx: i64, enabled: bool)

Source

pub fn is_glow_level_enabled(&self, idx: i64) -> bool

Source

pub fn set_glow_intensity(&mut self, intensity: f64)

Source

pub fn get_glow_intensity(&self) -> f64

Source

pub fn set_glow_strength(&mut self, strength: f64)

Source

pub fn get_glow_strength(&self) -> f64

Source

pub fn set_glow_bloom(&mut self, amount: f64)

Source

pub fn get_glow_bloom(&self) -> f64

Source

pub fn set_glow_blend_mode(&mut self, mode: i64)

Source

pub fn get_glow_blend_mode(&self) -> EnvironmentGlowBlendMode

Source

pub fn set_glow_hdr_bleed_threshold(&mut self, threshold: f64)

Source

pub fn get_glow_hdr_bleed_threshold(&self) -> f64

Source

pub fn set_glow_hdr_bleed_scale(&mut self, scale: f64)

Source

pub fn get_glow_hdr_bleed_scale(&self) -> f64

Source

pub fn set_glow_bicubic_upscale(&mut self, enabled: bool)

Source

pub fn is_glow_bicubic_upscale_enabled(&self) -> bool

Source

pub fn set_adjustment_enable(&mut self, enabled: bool)

Source

pub fn is_adjustment_enabled(&self) -> bool

Source

pub fn set_adjustment_brightness(&mut self, brightness: f64)

Source

pub fn get_adjustment_brightness(&self) -> f64

Source

pub fn set_adjustment_contrast(&mut self, contrast: f64)

Source

pub fn get_adjustment_contrast(&self) -> f64

Source

pub fn set_adjustment_saturation(&mut self, saturation: f64)

Source

pub fn get_adjustment_saturation(&self) -> f64

Source

pub fn set_adjustment_color_correction( &mut self, color_correction: Option<Texture>, )

Source

pub fn get_adjustment_color_correction(&self) -> Option<Texture>

Source

pub fn _setup_local_to_scene(&mut self)

Inherited from Resource.

Source

pub fn set_path(&mut self, path: GodotString)

Inherited from Resource.

Source

pub fn take_over_path(&mut self, path: GodotString)

Inherited from Resource.

Source

pub fn get_path(&self) -> GodotString

Inherited from Resource.

Source

pub fn set_name(&mut self, name: GodotString)

Inherited from Resource.

Source

pub fn get_name(&self) -> GodotString

Inherited from Resource.

Source

pub fn get_rid(&self) -> Rid

Inherited from Resource.

Source

pub fn set_local_to_scene(&mut self, enable: bool)

Inherited from Resource.

Source

pub fn is_local_to_scene(&self) -> bool

Inherited from Resource.

Source

pub fn get_local_scene(&self) -> Option<Node>

Inherited from Resource.

Source

pub fn setup_local_to_scene(&mut self)

Inherited from Resource.

Source

pub fn duplicate(&self, subresources: bool) -> Option<Resource>

Inherited from Resource.

Source

pub fn init_ref(&mut self) -> bool

Inherited from Reference.

Source

pub fn _notification(&mut self, what: i64)

Inherited from Object.

Source

pub fn _set(&mut self, property: GodotString, value: Variant) -> bool

Inherited from Object.

Source

pub fn _get(&mut self, property: GodotString) -> Variant

Inherited from Object.

Source

pub fn _get_property_list(&mut self) -> VariantArray

Inherited from Object.

Source

pub fn _init(&mut self)

Inherited from Object.

Source

pub fn get_class(&self) -> GodotString

Inherited from Object.

Source

pub fn is_class(&self, _type: GodotString) -> bool

Inherited from Object.

Source

pub fn set(&mut self, property: GodotString, value: Variant)

Inherited from Object.

Source

pub fn get(&self, property: GodotString) -> Variant

Inherited from Object.

Source

pub fn set_indexed(&mut self, property: NodePath, value: Variant)

Inherited from Object.

Source

pub fn get_indexed(&self, property: NodePath) -> Variant

Inherited from Object.

Source

pub fn get_property_list(&self) -> VariantArray

Inherited from Object.

Source

pub fn get_method_list(&self) -> VariantArray

Inherited from Object.

Source

pub fn notification(&mut self, what: i64, reversed: bool)

Inherited from Object.

Source

pub fn get_instance_id(&self) -> i64

Inherited from Object.

Source

pub fn set_script(&mut self, script: Option<Reference>)

Inherited from Object.

Source

pub fn get_script(&self) -> Option<Reference>

Inherited from Object.

Source

pub fn set_meta(&mut self, name: GodotString, value: Variant)

Inherited from Object.

Source

pub fn get_meta(&self, name: GodotString) -> Variant

Inherited from Object.

Source

pub fn has_meta(&self, name: GodotString) -> bool

Inherited from Object.

Source

pub fn get_meta_list(&self) -> StringArray

Inherited from Object.

Source

pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray)

Inherited from Object.

Source

pub fn has_user_signal(&self, signal: GodotString) -> bool

Inherited from Object.

Source

pub fn emit_signal( &mut self, signal: GodotString, varargs: &[Variant], ) -> Variant

Inherited from Object.

Source

pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant

Inherited from Object.

Source

pub fn call_deferred( &mut self, method: GodotString, varargs: &[Variant], ) -> Variant

Inherited from Object.

Source

pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant

Inherited from Object.

Source

pub fn has_method(&self, method: GodotString) -> bool

Inherited from Object.

Source

pub fn get_signal_list(&self) -> VariantArray

Inherited from Object.

Source

pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray

Inherited from Object.

Source

pub fn get_incoming_connections(&self) -> VariantArray

Inherited from Object.

Source

pub fn connect( &mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64, ) -> GodotResult

Inherited from Object.

Source

pub fn disconnect( &mut self, signal: GodotString, target: Option<Object>, method: GodotString, )

Inherited from Object.

Source

pub fn is_connected( &self, signal: GodotString, target: Option<Object>, method: GodotString, ) -> bool

Inherited from Object.

Source

pub fn set_block_signals(&mut self, enable: bool)

Inherited from Object.

Source

pub fn is_blocking_signals(&self) -> bool

Inherited from Object.

Source

pub fn property_list_changed_notify(&mut self)

Inherited from Object.

Source

pub fn set_message_translation(&mut self, enable: bool)

Inherited from Object.

Source

pub fn can_translate_messages(&self) -> bool

Inherited from Object.

Source

pub fn tr(&self, message: GodotString) -> GodotString

Inherited from Object.

Source

pub fn is_queued_for_deletion(&self) -> bool

Inherited from Object.

Source

pub fn to_resource(&self) -> Resource

Up-cast.

Source

pub fn to_reference(&self) -> Reference

Up-cast.

Source

pub fn to_object(&self) -> Object

Up-cast.

Source

pub fn cast<T: GodotObject>(&self) -> Option<T>

Generic dynamic cast.

Trait Implementations§

Source§

impl Debug for Environment

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for Environment

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl GodotObject for Environment

Source§

fn class_name() -> &'static str

Source§

impl ToVariant for Environment

Source§

fn to_variant(&self) -> Variant

Source§

fn from_variant(variant: &Variant) -> Option<Self>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.