14 #ifndef RENDERMODEATTRIB_H 15 #define RENDERMODEATTRIB_H 54 const LColor &wireframe_color = LColor::zero());
57 static CPT(
RenderAttrib) make(Mode mode, PN_stdfloat thickness = 1.0f,
58 bool perspective =
false,
59 const LColor &wireframe_color = LColor::zero());
62 INLINE Mode get_mode()
const;
63 INLINE PN_stdfloat get_thickness()
const;
64 INLINE
bool get_perspective()
const;
65 INLINE
const LColor &get_wireframe_color()
const;
66 INLINE
int get_geom_rendering(
int geom_rendering)
const;
69 MAKE_PROPERTY(mode, get_mode);
70 MAKE_PROPERTY(thickness, get_thickness);
71 MAKE_PROPERTY(perspective, get_perspective);
72 MAKE_PROPERTY(wireframe_color, get_wireframe_color);
75 virtual void output(std::ostream &out)
const;
78 virtual int compare_to_impl(
const RenderAttrib *other)
const;
79 virtual size_t get_hash_impl()
const;
84 PN_stdfloat _thickness;
86 LColor _wireframe_color;
89 static int get_class_slot() {
92 virtual int get_slot()
const {
93 return get_class_slot();
95 MAKE_PROPERTY(class_slot, get_class_slot);
98 static void register_with_read_factory();
109 static void init_type() {
110 RenderAttrib::init_type();
112 RenderAttrib::get_class_type());
117 return get_class_type();
119 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
123 static int _attrib_slot;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
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.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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 ...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Specifies how polygons are to be drawn.
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 ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.