This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
Light.py
63 lines (54 loc) · 2.56 KB
/
Light.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from abaqusConstants import *
class Light:
"""The Light object stores settings that control how objects are lit when the *renderStyle*
is set to SHADED.
The Light object has no constructor; Abaqus creates them as part of the
*defaultLightOptions* and the *lightOptions* objects when a session is started.
Notes
-----
This object can be accessed by:
.. code-block::
session.defaultLightOptions.lights[i]
session.viewports[name].lightOptions.lights[i]
"""
def setValues(
self,
enabled: Boolean = OFF,
type: SymbolicConstant = DIRECTIONAL,
latitude: float = 0,
longitude: float = 0,
diffuseColor: str = "",
specularColor: str = "",
):
"""This method modifies the Light object.
Parameters
----------
enabled
A Boolean specifying whether the light is on or off. The default value is OFF.
type
A SymbolicConstant specifying how the effect of the light should be calculated. Possible
values are:DIRECTIONAL, specifying a constant vector should be used for the direction
from the light to a vertex.POINT, specifying the vector from the light to each vertex
should be calculated.The default value is DIRECTIONAL.When set to *type* =DIRECTIONAL, a
constant vector is used for the direction from the light to a vertex. When *type*
=POINT, the result is more realistic because the actual vector from the light to each
vertex is calculated. However, overall performance is decreased.
latitude
A Float specifying the altitude of the light above or below the camera. Possible values
are -90.0 ≤≤ *latitude* ≤≤ 90.0. The default value is 0.0.
longitude
A Float specifying the east/west position of the light to the left or right of the
camera. Possible values are -90.0 ≤≤ *longitude* ≤≤ 90.0. The default value is 0.0.
diffuseColor
A String specifying the color of the light added to the scene by this light source. The
initial value is 70% gray. A list of valid color strings is in the *colors* map in the
*session* object.
specularColor
A String specifying the color of the specular highlights created by this light source.
The initial value is 36% gray. A list of valid color strings is in the *colors* map in
the *session* object.
Raises
------
RangeError
"""
pass