14#ifndef CULLBINATTRIB_H
15#define CULLBINATTRIB_H
27class EXPCL_PANDA_PGRAPH CullBinAttrib :
public RenderAttrib {
29 INLINE CullBinAttrib();
32 static CPT(RenderAttrib)
make(
const std::string &bin_name,
int draw_order);
43 virtual void output(std::ostream &out)
const;
46 virtual int compare_to_impl(
const RenderAttrib *other)
const;
47 virtual size_t get_hash_impl()
const;
50 std::string _bin_name;
54 static int get_class_slot() {
57 virtual int get_slot()
const {
58 return get_class_slot();
60 MAKE_PROPERTY(class_slot, get_class_slot);
63 static void register_with_read_factory();
67 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
68 void fillin(DatagramIterator &scan, BamReader *manager);
71 static TypeHandle get_class_type() {
74 static void init_type() {
75 RenderAttrib::init_type();
77 RenderAttrib::get_class_type());
78 _attrib_slot =
register_slot(_type_handle, 100,
new CullBinAttrib);
80 virtual TypeHandle get_type()
const {
81 return get_class_type();
83 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
86 static TypeHandle _type_handle;
87 static int _attrib_slot;
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
get_draw_order
Returns the draw order this attribute specifies.
get_bin_name
Returns the name of the bin this attribute specifies.
static ConstPointerTo< RenderAttrib > make(const std::string &bin_name, int draw_order)
Constructs a new CullBinAttrib assigning geometry into the named bin.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
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.
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.