SourceAmbientEnvironment#
- class ansys.speos.core.source.SourceAmbientEnvironment(project, name, description='', metadata=None, source_instance=None, default_parameters=None)#
Bases:
BaseSourceAmbientEnvironment ambient source.
By default [0, 0, 1] is used as zenith direction, [0, 1, 0] as north direction.
- Parameters:
- project
ansys.speos.core.project.Project Project that will own the feature.
- name
str Name of the feature.
- description
str Description of the feature. By default,
"".- metadata
Optional[Mapping[str,str]] Metadata of the feature. By default,
{}.- default_parameters
Optional[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.
- project
- Parameters:
project (SourceAmbientEnvironment.__init__.project)
name (str)
description (str)
source_instance (Optional[ansys.speos.core.kernel.scene.ProtoScene.SourceInstance])
default_parameters (Optional[ansys.speos.core.generic.parameters.AmbientEnvironmentParameters])
Overview#
Set the color space to user-defined. |
|
Set the color space to use one of the presets. |
|
Save feature: send the local data to the speos server database. |
|
Reset feature: override local data by the one from the speos server database. |
|
Delete feature: delete data from the speos server database. |
Zenith direction of the environment light source. |
|
Reverse zenith direction of the environment light source. |
|
North direction of the environment light source. |
|
Reverse north direction of the environment light source. |
|
Luminance of the environment light source. |
|
Location of the environment image file. |
|
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.
- 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.
- 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.
- 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.
- property SourceAmbientEnvironment.luminance: float#
Luminance of the environment light source.
This property get and set the Luminance value of the source.
- 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:
- uri
Union[str,pathlib.Path] format file uri (hdr, exr, png, bmp, jpg, tiff, rgb).
- uri
- Returns:
- uri
str format file uri (hdr, exr, png, bmp, jpg, tiff, rgb).
- uri
- 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.UserDefinedColorSpaceSettings 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.PredefinedColorSpaceEnvironment 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.SourceAmbientEnvironmentAmbient environment Source feature.
- SourceAmbientEnvironment.reset()#
Reset feature: override local data by the one from the speos server database.
- Returns:
ansys.speos.core.source.SourceAmbientEnvironmentAmbient 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.SourceAmbientEnvironmentAmbient environment Source feature.