14 #ifndef COLORSCALEATTRIB_H
15 #define COLORSCALEATTRIB_H
38 INLINE
bool is_off()
const;
39 INLINE
bool is_identity()
const;
40 INLINE
bool has_scale()
const;
41 INLINE
bool has_rgb_scale()
const;
42 INLINE
bool has_alpha_scale()
const;
43 INLINE
const LVecBase4 &get_scale()
const;
44 CPT(
RenderAttrib) set_scale(
const LVecBase4 &scale)
const;
47 MAKE_PROPERTY2(scale, has_scale, get_scale);
51 virtual void output(std::ostream &out)
const;
54 virtual int compare_to_impl(
const RenderAttrib *other)
const;
55 virtual size_t get_hash_impl()
const;
60 void quantize_scale();
66 bool _has_alpha_scale;
71 static int get_class_slot() {
74 virtual int get_slot()
const {
75 return get_class_slot();
77 MAKE_PROPERTY(class_slot, get_class_slot);
80 static void register_with_read_factory();
91 static void init_type() {
92 RenderAttrib::init_type();
94 RenderAttrib::get_class_type());
99 return get_class_type();
101 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
105 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 ...
Applies a scale to colors in the scene graph and on vertices.
virtual bool lower_attrib_can_override() const
Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib o...
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...
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.
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.