14#ifndef LIGHTRAMPATTRIB_H
15#define LIGHTRAMPATTRIB_H
44 static CPT(
RenderAttrib) make_single_threshold(PN_stdfloat thresh0, PN_stdfloat lev0);
45 static CPT(
RenderAttrib) make_double_threshold(PN_stdfloat thresh0, PN_stdfloat lev0, PN_stdfloat thresh1, PN_stdfloat lev1);
51 INLINE LightRampMode get_mode()
const;
52 INLINE PN_stdfloat get_level(
int n)
const;
53 INLINE PN_stdfloat get_threshold(
int n)
const;
56 MAKE_PROPERTY(mode, get_mode);
59 virtual void output(std::ostream &out)
const;
62 virtual int compare_to_impl(
const RenderAttrib *other)
const;
63 virtual size_t get_hash_impl()
const;
67 PN_stdfloat _level[2];
68 PN_stdfloat _threshold[2];
73 static int get_class_slot() {
76 virtual int get_slot()
const {
77 return get_class_slot();
79 MAKE_PROPERTY(class_slot, get_class_slot);
82 static void register_with_read_factory();
93 static void init_type() {
94 RenderAttrib::init_type();
96 RenderAttrib::get_class_type());
100 return get_class_type();
102 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
106 static int _attrib_slot;
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
A Light Ramp is any unary operator that takes a rendered pixel as input, and adjusts the brightness o...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
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 ...
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.