collada.light.DirectionalLight¶
-
class
collada.light.DirectionalLight(id, color, xmlnode=None)¶ Bases:
collada.light.LightDirectional light as defined in COLLADA tag <directional> tag.

-
__init__(id, color, xmlnode=None)¶ Create a new directional light.
Parameters: - id (str) – A unique string identifier for the light
- color (tuple) – Either a tuple of size 3 containing the RGB color value of the light or a tuple of size 4 containing the RGBA color value of the light
- xmlnode – If loaded from xml, the xml node
Methods
__init__(id, color[, xmlnode])Create a new directional light. bind(matrix)Binds this light to a transform matrix. load(collada, localscope, node)Load and return a class instance from an XML node. save()Saves the light’s properties back to xmlnode-
id= None¶ The unique string identifier for the light
-
color= None¶ Either a tuple of size 3 containing the RGB color value of the light or a tuple of size 4 containing the RGBA color value of the light
-
xmlnode= None¶ ElementTree representation of the light.
-
static
load(collada, localscope, node)¶ Load and return a class instance from an XML node.
Inspect the data inside node, which must match this class tag and create an instance out of it.
Parameters: - collada (collada.Collada) – The collada file object where this object lives
- localscope (dict) – If there is a local scope where we should look for local ids (sid) this is the dictionary. Otherwise empty dict ({})
- node – An Element from python’s ElementTree API
-
bind(matrix)¶ Binds this light to a transform matrix.
Parameters: matrix (numpy.array) – A 4x4 numpy float matrix Return type: collada.light.BoundDirectionalLight
-