17 INLINE Spotlight::CData::
20 _specular_color(1.0f, 1.0f, 1.0f, 1.0f),
21 _attenuation(1.0f, 0.0f, 0.0f),
22 _max_distance(make_inf((PN_stdfloat)0))
29 INLINE Spotlight::CData::
30 CData(
const Spotlight::CData ©) :
31 _exponent(copy._exponent),
32 _specular_color(copy._specular_color),
33 _attenuation(copy._attenuation),
34 _max_distance(copy._max_distance)
44 CDReader cdata(_cycler);
45 return cdata->_exponent;
58 CDWriter cdata(_cycler);
59 cdata->_exponent = exponent;
68 if (_has_specular_color) {
69 CDReader cdata(_cycler);
70 return cdata->_specular_color;
81 CDWriter cdata(_cycler);
82 _has_specular_color =
true;
83 cdata->_specular_color = color;
92 _has_specular_color =
false;
102 CDReader cdata(_cycler);
103 return cdata->_attenuation;
113 CDWriter cdata(_cycler);
114 cdata->_attenuation = attenuation;
121 INLINE PN_stdfloat Spotlight::
122 get_max_distance()
const {
123 CDReader cdata(_cycler);
124 return cdata->_max_distance;
133 CDWriter cdata(_cycler);
134 cdata->_max_distance = max_distance;
PN_stdfloat get_exponent() const final
For spotlights, returns the exponent that controls the amount of light falloff from the center of the...
set_attenuation
Sets the terms of the attenuation equation for the light.
set_exponent
Sets the exponent that controls the amount of light falloff from the center of the spotlight.
set_specular_color
Sets the color of specular highlights generated by the light.
void clear_specular_color()
Clears a custom specular color setting, meaning that the specular color will now come from the color.
get_color
Returns the basic color of the light.
const LVecBase3 & get_attenuation() const final
Returns the terms of the attenuation equation for the light.
const LColor & get_specular_color() const final
Returns the color of specular highlights generated by the light.
set_max_distance
Sets the radius of the light's sphere of influence.