14#ifndef CULLFACEATTRIB_H
15#define CULLFACEATTRIB_H
26class EXPCL_PANDA_PGRAPH CullFaceAttrib :
public RenderAttrib {
31 M_cull_counter_clockwise,
36 INLINE CullFaceAttrib(Mode mode,
bool reverse);
39 static CPT(RenderAttrib)
make(Mode mode = M_cull_clockwise);
53 virtual void output(std::ostream &out)
const;
56 virtual int compare_to_impl(
const RenderAttrib *other)
const;
57 virtual size_t get_hash_impl()
const;
58 virtual CPT(RenderAttrib) compose_impl(
const RenderAttrib *other)
const;
59 virtual CPT(RenderAttrib) invert_compose_impl(
const RenderAttrib *other)
const;
66 static int get_class_slot() {
69 virtual int get_slot()
const {
70 return get_class_slot();
72 MAKE_PROPERTY(class_slot, get_class_slot);
75 static void register_with_read_factory();
79 static TypedWritable *make_from_bam(
const FactoryParams ¶ms);
80 void fillin(DatagramIterator &scan, BamReader *manager);
83 static TypeHandle get_class_type() {
86 static void init_type() {
87 RenderAttrib::init_type();
89 RenderAttrib::get_class_type());
91 new CullFaceAttrib(M_cull_clockwise,
false));
93 virtual TypeHandle get_type()
const {
94 return get_class_type();
96 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
99 static TypeHandle _type_handle;
100 static int _attrib_slot;
get_actual_mode
Returns the actual culling mode, without considering the effects of the reverse flag.
get_effective_mode
Returns the effective culling mode.
static ConstPointerTo< RenderAttrib > make_reverse()
Constructs a new CullFaceAttrib object that reverses the effects of any other CullFaceAttrib objects ...
get_reverse
Returns the 'reverse' flag.
static ConstPointerTo< RenderAttrib > make_default()
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attrib...
static ConstPointerTo< RenderAttrib > make(Mode mode=M_cull_clockwise)
Constructs a new CullFaceAttrib object that specifies how to cull geometry.
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.