collada.light.SpotLight¶
-
class
collada.light.
SpotLight
(id, color, constant_att=None, linear_att=None, quad_att=None, falloff_ang=None, falloff_exp=None, xmlnode=None)¶ Bases:
collada.light.Light
Spot light as defined in COLLADA tag <spot>.
-
__init__
(id, color, constant_att=None, linear_att=None, quad_att=None, falloff_ang=None, falloff_exp=None, xmlnode=None)¶ Create a new spot 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
- constant_att (float) – Constant attenuation factor
- linear_att (float) – Linear attenuation factor
- quad_att (float) – Quadratic attenuation factor
- falloff_ang (float) – Falloff angle
- falloff_exp (float) – Falloff exponent
- xmlnode – If loaded from xml, the xml node
Methods
__init__
(id, color[, constant_att, ...])Create a new spot light. bind
(matrix)Binds this light to a transform matrix. load
(collada, localscope, 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
-
constant_att
= None¶ Constant attenuation factor.
-
linear_att
= None¶ Linear attenuation factor.
-
quad_att
= None¶ Quadratic attenuation factor.
-
falloff_ang
= None¶ Falloff angle
-
falloff_exp
= None¶ Falloff exponent
-
xmlnode
= None¶ ElementTree representation of the light.
-
bind
(matrix)¶ Binds this light to a transform matrix.
Parameters: matrix (numpy.array) – A 4x4 numpy float matrix Return type: collada.light.BoundSpotLight
-