57 Operation get_operation()
const;
59 int get_num_lights()
const;
60 Light *get_light(
int n)
const;
61 bool has_light(
Light *light)
const;
71 INLINE
size_t get_num_on_lights()
const;
72 INLINE
size_t get_num_non_ambient_lights()
const;
73 INLINE
NodePath get_on_light(
size_t n)
const;
74 MAKE_SEQ(get_on_lights, get_num_on_lights, get_on_light);
75 INLINE
bool has_on_light(
const NodePath &light)
const;
76 INLINE
bool has_any_on_light()
const;
78 INLINE
size_t get_num_off_lights()
const;
79 INLINE
NodePath get_off_light(
size_t n)
const;
80 MAKE_SEQ(get_off_lights, get_num_off_lights, get_off_light);
81 INLINE
bool has_off_light(
const NodePath &light)
const;
82 INLINE
bool has_all_off()
const;
84 INLINE
bool is_identity()
const;
91 NodePath get_most_important_light()
const;
92 LColor get_ambient_contribution()
const;
94 MAKE_SEQ_PROPERTY(on_lights, get_num_on_lights, get_on_light);
95 MAKE_SEQ_PROPERTY(off_lights, get_num_off_lights, get_off_light);
98 virtual void output(std::ostream &out)
const;
99 virtual void write(std::ostream &out,
int indent_level)
const;
102 virtual int compare_to_impl(
const RenderAttrib *other)
const;
103 virtual size_t get_hash_impl()
const;
108 INLINE
void check_sorted()
const;
109 void sort_on_lights();
113 Lights _on_lights, _off_lights;
114 bool _off_all_lights;
120 size_t _num_non_ambient_lights;
128 static int get_class_slot() {
131 virtual int get_slot()
const {
132 return get_class_slot();
134 MAKE_PROPERTY(class_slot, get_class_slot);
150 static void register_with_read_factory();
164 static void init_type() {
165 RenderAttrib::init_type();
167 RenderAttrib::get_class_type());
171 return get_class_type();
173 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
177 static int _attrib_slot;
A basic node of the scene graph or data graph.
The abstract interface to all kinds of lights.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class for a number of render attributes (other than transform) that may be set on sc...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Base class for objects that can be written to and read from Bam files.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is our own Panda specialization on the default STL list.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
static int register_slot(TypeHandle type_handle, int sort, RenderAttrib *default_attrib)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
A class to retrieve the individual data elements previously stored in a Datagram.
TypeHandle is the identifier used to differentiate C++ class types.
This is a sequence number that increments monotonically.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Indicates which set of lights should be considered "on" to illuminate geometry at this level and belo...