15 #ifndef COLORSCALEATTRIB_H 16 #define COLORSCALEATTRIB_H 18 #include "pandabase.h" 20 #include "renderAttrib.h" 41 INLINE
bool is_off()
const;
42 INLINE
bool is_identity()
const;
43 INLINE
bool has_scale()
const;
44 INLINE
bool has_rgb_scale()
const;
45 INLINE
bool has_alpha_scale()
const;
46 INLINE
const LVecBase4 &get_scale()
const;
51 virtual void output(ostream &out)
const;
54 virtual int compare_to_impl(
const RenderAttrib *other)
const;
55 virtual size_t get_hash_impl()
const;
61 void quantize_scale();
67 bool _has_alpha_scale;
72 static int get_class_slot() {
75 virtual int get_slot()
const {
76 return get_class_slot();
80 static void register_with_read_factory();
91 static void init_type() {
92 RenderAttrib::init_type();
93 register_type(_type_handle,
"ColorScaleAttrib",
94 RenderAttrib::get_class_type());
95 _attrib_slot =
register_slot(_type_handle, 100, make_default);
98 return get_class_type();
100 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
104 static int _attrib_slot;
107 #include "colorScaleAttrib.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.
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...
Applies a scale to colors in the scene graph and on vertices.
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
This is the base class for all three-component vectors and points.
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 ...
virtual bool lower_attrib_can_override() const
Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib o...