SourceAmbientEnvironment#

class ansys.speos.core.source.SourceAmbientEnvironment(project, name, description='', metadata=None, source_instance=None, default_parameters=None)#

Bases: BaseSourceAmbient

Environment ambient source.

By default [0, 0, 1] is used as zenith direction, [0, 1, 0] as north direction.

Parameters:
projectansys.speos.core.project.Project

Project that will own the feature.

namestr

Name of the feature.

descriptionstr

Description of the feature. By default, "".

metadataOptional[Mapping[str, str]]

Metadata of the feature. By default, {}.

default_parametersOptional[ ansys.speos.core.generic.parameters.AmbientEnvironmentParameters] = None

If defined the values in the SourceAmbientEnvironment instance will be overwritten by the values of the data class.

Parameters:

Overview#

set_userdefined_color_space

Set the color space to user-defined.

set_predefined_color_space

Set the color space to use one of the presets.

commit

Save feature: send the local data to the speos server database.

reset

Reset feature: override local data by the one from the speos server database.

delete

Delete feature: delete data from the speos server database.

zenith_direction

Zenith direction of the environment light source.

reverse_zenith_direction

Reverse zenith direction of the environment light source.

north_direction

North direction of the environment light source.

reverse_north_direction

Reverse north direction of the environment light source.

luminance

Luminance of the environment light source.

image_file_uri

Location of the environment image file.

color_space

Property containing all options in regard to the color space properties.

Import detail#

from ansys.speos.core.source import SourceAmbientEnvironment

Property detail#

property SourceAmbientEnvironment.zenith_direction: List[float]#

Zenith direction of the environment light source.

This property get and set the zenith direction of the environment source.

Parameters:
directionList[float]

direction defines the zenith direction of the environment light source.

Returns:
List[float]

direction defines the zenith direction of the environment light source.

property SourceAmbientEnvironment.reverse_zenith_direction: bool#

Reverse zenith direction of the environment light source.

This property get and set if reverse zenith direction is True.

Parameters:
valuebool

True to reverse zenith direction, False otherwise.

Returns:
bool

True to reverse zenith direction, False otherwise.

property SourceAmbientEnvironment.north_direction: List[float]#

North direction of the environment light source.

This property get and set the north direction of the environment source.

Parameters:
directionList[float]

direction defines the north direction, default value to be [0, 1, 0].

Returns:
List[float]

direction defines the north direction of the environment source.

property SourceAmbientEnvironment.reverse_north_direction: bool#

Reverse north direction of the environment light source.

This property get and set if reverse north direction is True.

Parameters:
valuebool

True to reverse north direction, False otherwise.

Returns:
bool

True as reverse north direction, False otherwise.

property SourceAmbientEnvironment.luminance: float#

Luminance of the environment light source.

This property get and set the Luminance value of the source.

Parameters:
valuefloat

set value of Luminance (cd/m^2).

Returns:
float

value of Luminance setting (cd/m^2).

property SourceAmbientEnvironment.image_file_uri: str#

Location of the environment image file.

This property gets or sets the environment image file used by the ambient environment source.

Parameters:
uriUnion[str, pathlib.Path]

format file uri (hdr, exr, png, bmp, jpg, tiff, rgb).

Returns:
uristr

format file uri (hdr, exr, png, bmp, jpg, tiff, rgb).

property SourceAmbientEnvironment.color_space: None | BaseSource | BaseSource#

Property containing all options in regard to the color space properties.

Returns:
Union[None, ansys.speos.core.source.BaseSource.PredefinedColorSpace, ansys.speos.core.source.BaseSource.UserDefinedColorSpace]

Instance of Predefined Color Space class

Method detail#

SourceAmbientEnvironment.set_userdefined_color_space()#

Set the color space to user-defined.

Returns:
ansys.speos.core.source.BaseSource.UserDefinedColorSpace

Settings for user defined color space.

SourceAmbientEnvironment.set_predefined_color_space()#

Set the color space to use one of the presets.

Returns:
ansys.speos.core.source.BaseSource.PredefinedColorSpace

Environment source color space for sRGB or AdobeRGB

SourceAmbientEnvironment.commit()#

Save feature: send the local data to the speos server database.

Returns:
ansys.speos.core.source.SourceAmbientEnvironment

Ambient environment Source feature.

SourceAmbientEnvironment.reset()#

Reset feature: override local data by the one from the speos server database.

Returns:
ansys.speos.core.source.SourceAmbientEnvironment

Ambient environment Source feature.

SourceAmbientEnvironment.delete()#

Delete feature: delete data from the speos server database.

The local data are still available

Returns:
ansys.speos.core.source.SourceAmbientEnvironment

Ambient environment Source feature.