Panda3D
|
Specifies how polygons are to be drawn. More...
#include "rescaleNormalAttrib.h"
Public Types | |
enum | Mode { M_none, M_rescale, M_normalize, M_auto } |
Public Member Functions | |
virtual TypeHandle | force_init_type () |
Mode | get_mode () const |
Returns the render mode. | |
virtual int | get_slot () const |
virtual TypeHandle | get_type () const |
virtual void | output (ostream &out) const |
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 Public Member Functions | |
static | CPT (RenderAttrib) make(Mode mode) |
static | CPT (RenderAttrib) make_default() |
static int | get_class_slot () |
static TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type RescaleNormalAttrib. | |
Protected Member Functions | |
virtual int | compare_to_impl (const RenderAttrib *other) const |
Intended to be overridden by derived RescaleNormalAttrib types to return a unique number indicating whether this RescaleNormalAttrib is equivalent to the other one. | |
void | fillin (DatagramIterator &scan, BamReader *manager) |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new RescaleNormalAttrib. | |
virtual size_t | get_hash_impl () const |
Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. | |
Static Protected Member Functions | |
static TypedWritable * | make_from_bam (const FactoryParams ¶ms) |
This function is called by the BamReader's factory when a new object of type RescaleNormalAttrib is encountered in the Bam file. |
Specifies how polygons are to be drawn.
Definition at line 28 of file rescaleNormalAttrib.h.
int RescaleNormalAttrib::compare_to_impl | ( | const RenderAttrib * | other | ) | const [protected, virtual] |
Intended to be overridden by derived RescaleNormalAttrib types to return a unique number indicating whether this RescaleNormalAttrib is equivalent to the other one.
This should return 0 if the two RescaleNormalAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.
This will only be called with two RescaleNormalAttrib objects whose get_type() functions return the same.
Reimplemented from RenderAttrib.
Definition at line 93 of file rescaleNormalAttrib.cxx.
void RescaleNormalAttrib::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected, virtual] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new RescaleNormalAttrib.
Reimplemented from RenderAttrib.
Definition at line 168 of file rescaleNormalAttrib.cxx.
References DatagramIterator::get_int8().
Referenced by make_from_bam().
size_t RescaleNormalAttrib::get_hash_impl | ( | ) | const [protected, virtual] |
Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties.
RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash.
Reimplemented from RenderAttrib.
Definition at line 110 of file rescaleNormalAttrib.cxx.
References integer_hash< Key, Compare >::add_hash().
RescaleNormalAttrib::Mode RescaleNormalAttrib::get_mode | ( | ) | const [inline] |
Returns the render mode.
Definition at line 34 of file rescaleNormalAttrib.I.
TypedWritable * RescaleNormalAttrib::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type RescaleNormalAttrib is encountered in the Bam file.
It should create the RescaleNormalAttrib and extract its information from the file.
Definition at line 149 of file rescaleNormalAttrib.cxx.
References fillin().
Referenced by register_with_read_factory().
void RescaleNormalAttrib::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type RescaleNormalAttrib.
Definition at line 123 of file rescaleNormalAttrib.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
void RescaleNormalAttrib::write_datagram | ( | BamWriter * | manager, |
Datagram & | dg | ||
) | [virtual] |
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from RenderAttrib.
Definition at line 134 of file rescaleNormalAttrib.cxx.
References Datagram::add_int8().