17 INLINE PointLight::CData::
19 _specular_color(1.0f, 1.0f, 1.0f, 1.0f),
20 _attenuation(1.0f, 0.0f, 0.0f),
21 _max_distance(make_inf((PN_stdfloat)0)),
22 _point(0.0f, 0.0f, 0.0f)
29 INLINE PointLight::CData::
30 CData(
const PointLight::CData ©) :
31 _specular_color(copy._specular_color),
32 _attenuation(copy._attenuation),
33 _max_distance(copy._max_distance),
44 if (_has_specular_color) {
45 CDReader cdata(_cycler);
46 return cdata->_specular_color;
57 CDWriter cdata(_cycler);
58 _has_specular_color =
true;
59 cdata->_specular_color = color;
68 _has_specular_color =
false;
78 CDReader cdata(_cycler);
79 return cdata->_attenuation;
89 CDWriter cdata(_cycler);
90 cdata->_attenuation = attenuation;
97 INLINE PN_stdfloat PointLight::
98 get_max_distance()
const {
99 CDReader cdata(_cycler);
100 return cdata->_max_distance;
109 CDWriter cdata(_cycler);
110 cdata->_max_distance = max_distance;
117 INLINE
const LPoint3 &PointLight::
119 CDReader cdata(_cycler);
120 return cdata->_point;
128 CDWriter cdata(_cycler);
129 cdata->_point = point;
set_specular_color
Sets the color of specular highlights generated by the light.
const LColor & get_specular_color() const final
Returns the color of specular highlights generated by the light.
set_attenuation
Sets the terms of the attenuation equation for the light.
set_point
Sets the point in space at which the light is located.
set_max_distance
Sets the radius of the light's sphere of influence.
const LVecBase3 & get_attenuation() const final
Returns the terms of the attenuation equation for the light.
get_color
Returns the basic color of the light.
void clear_specular_color()
Clears a custom specular color setting, meaning that the specular color will now come from the color.