18 LightAttrib() : _off_all_lights(false), _num_non_ambient_lights(0) {
24 INLINE
size_t LightAttrib::
25 get_num_on_lights()
const {
27 return _sorted_on_lights.size();
37 return _num_non_ambient_lights;
46 return _sorted_on_lights[n];
55 return _on_lights.find(light) != _on_lights.
end();
63 return !_on_lights.
empty();
69 INLINE
size_t LightAttrib::
70 get_num_off_lights()
const {
71 return _off_lights.
size();
81 return _off_lights[n];
90 return _off_lights.find(light) != _off_lights.
end() ||
100 return _off_all_lights;
109 return _on_lights.
empty() && _off_lights.
empty() && !_off_all_lights;
116 INLINE
void LightAttrib::
117 check_sorted()
const {
size_type_0 size() const
Returns the number of elements in the ordered vector.
iterator_0 end()
Returns the iterator that marks the end of the ordered vector.
get_off_light
Returns the nth light turned off by the attribute, sorted in arbitrary (pointer) order.
bool empty() const
Returns true if the ordered vector is empty, false otherwise.
bool is_identity() const
Returns true if this is an identity attrib: it does not change the set of lights in use.
static NodePath fail()
Creates a NodePath with the ET_fail error type set.
get_on_light
Returns the nth light turned on by the attribute, sorted in render order.
bool has_on_light(const NodePath &light) const
Returns true if the indicated light is turned on by the attrib, false otherwise.
size_t get_num_non_ambient_lights() const
Returns the number of non-ambient lights that are turned on by this attribute.
static UpdateSeq get_sort_seq()
Returns a global sequence number that is incremented any time any Light in the world changes sort or ...
bool has_all_off() const
Returns true if this attrib turns off all lights (although it may also turn some on).
bool has_off_light(const NodePath &light) const
Returns true if the indicated light is turned off by the attrib, false otherwise.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
bool has_any_on_light() const
Returns true if any light is turned on by the attrib, false otherwise.
Indicates which set of lights should be considered "on" to illuminate geometry at this level and belo...