14#ifndef LOGICOPATTRIB_H
15#define LOGICOPATTRIB_H
30class EXPCL_PANDA_PGRAPH LogicOpAttrib :
public RenderAttrib {
53 INLINE LogicOpAttrib(Operation op);
57 static CPT(RenderAttrib)
make(Operation op);
64 virtual void output(std::ostream &out)
const;
67 virtual int compare_to_impl(
const RenderAttrib *other)
const;
68 virtual size_t get_hash_impl()
const;
74 static int get_class_slot() {
77 virtual int get_slot()
const {
78 return get_class_slot();
80 MAKE_PROPERTY(class_slot, get_class_slot);
83 static void register_with_read_factory();
87 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
88 void fillin(DatagramIterator &scan, BamReader *manager);
91 static TypeHandle get_class_type() {
94 static void init_type() {
95 RenderAttrib::init_type();
97 RenderAttrib::get_class_type());
98 _attrib_slot =
register_slot(_type_handle, 100,
new LogicOpAttrib(O_none));
100 virtual TypeHandle get_type()
const {
101 return get_class_type();
103 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
106 static TypeHandle _type_handle;
107 static int _attrib_slot;
110EXPCL_PANDA_PGRAPH std::ostream &operator << (std::ostream &out, LogicOpAttrib::Operation op);
An instance of this class is passed to the Factory when requesting it to do its business and construc...
static ConstPointerTo< RenderAttrib > make(Operation op)
Constructs a new LogicOpAttrib object with the given logic operation.
get_operation
Returns the logic operation specified by this attribute.
static ConstPointerTo< RenderAttrib > make_off()
Constructs a new LogicOpAttrib object that disables special-effect blending, allowing normal transpar...
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
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 ...
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.