15 #ifndef LIGHTRAMPATTRIB_H 16 #define LIGHTRAMPATTRIB_H 18 #include "pandabase.h" 19 #include "renderAttrib.h" 48 static CPT(
RenderAttrib) make_single_threshold(PN_stdfloat thresh0, PN_stdfloat lev0);
49 static CPT(
RenderAttrib) make_double_threshold(PN_stdfloat thresh0, PN_stdfloat lev0, PN_stdfloat thresh1, PN_stdfloat lev1);
55 INLINE LightRampMode get_mode()
const;
56 INLINE PN_stdfloat get_level(
int n)
const;
57 INLINE PN_stdfloat get_threshold(
int n)
const;
60 virtual void output(ostream &out)
const;
63 virtual int compare_to_impl(
const RenderAttrib *other)
const;
64 virtual size_t get_hash_impl()
const;
69 PN_stdfloat _level[2];
70 PN_stdfloat _threshold[2];
75 static int get_class_slot() {
78 virtual int get_slot()
const {
79 return get_class_slot();
83 static void register_with_read_factory();
94 static void init_type() {
95 RenderAttrib::init_type();
96 register_type(_type_handle,
"LightRampAttrib",
97 RenderAttrib::get_class_type());
98 _attrib_slot =
register_slot(_type_handle, 100, make_default);
101 return get_class_type();
103 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
107 static int _attrib_slot;
110 #include "lightRampAttrib.I" static int register_slot(TypeHandle type_handle, int sort, RenderAttribRegistry::MakeDefaultFunc *make_default_func)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
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...
Base class for objects that can be written to and read from Bam files.
A Light Ramp is any unary operator that takes a rendered pixel as input, and adjusts the brightness o...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...