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