Panda3D
|
Applies a Fog to the geometry at and below this node. More...
#include "fogAttrib.h"
Public Member Functions | |
virtual int | complete_pointers (TypedWritable **plist, BamReader *manager) |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin(). | |
virtual TypeHandle | force_init_type () |
Fog * | get_fog () const |
If the FogAttrib is not an 'off' FogAttrib, returns the fog that is associated. | |
virtual int | get_slot () const |
virtual TypeHandle | get_type () const |
bool | is_off () const |
Returns true if the FogAttrib is an 'off' FogAttrib, indicating that it should disable fog. | |
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(Fog *fog) |
static | CPT (RenderAttrib) make_off() |
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 FogAttrib. | |
Protected Member Functions | |
virtual int | compare_to_impl (const RenderAttrib *other) const |
Intended to be overridden by derived FogAttrib types to return a unique number indicating whether this FogAttrib 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 FogAttrib. | |
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 FogAttrib is encountered in the Bam file. |
Applies a Fog to the geometry at and below this node.
Definition at line 27 of file fogAttrib.h.
int FogAttrib::compare_to_impl | ( | const RenderAttrib * | other | ) | const [protected, virtual] |
Intended to be overridden by derived FogAttrib types to return a unique number indicating whether this FogAttrib is equivalent to the other one.
This should return 0 if the two FogAttrib 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 FogAttrib objects whose get_type() functions return the same.
Reimplemented from RenderAttrib.
Definition at line 93 of file fogAttrib.cxx.
int FogAttrib::complete_pointers | ( | TypedWritable ** | p_list, |
BamReader * | manager | ||
) | [virtual] |
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin().
Returns the number of pointers processed.
Reimplemented from TypedWritable.
Definition at line 138 of file fogAttrib.cxx.
void FogAttrib::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 FogAttrib.
Reimplemented from RenderAttrib.
Definition at line 177 of file fogAttrib.cxx.
References BamReader::read_pointer().
Referenced by make_from_bam().
Fog * FogAttrib::get_fog | ( | ) | const [inline] |
If the FogAttrib is not an 'off' FogAttrib, returns the fog that is associated.
Otherwise, return NULL.
Definition at line 45 of file fogAttrib.I.
Referenced by NodePath::get_fog(), and CullTraverser::traverse().
bool FogAttrib::is_off | ( | ) | const [inline] |
Returns true if the FogAttrib is an 'off' FogAttrib, indicating that it should disable fog.
Definition at line 33 of file fogAttrib.I.
Referenced by ShaderGenerator::analyze_renderstate(), NodePath::has_fog(), and NodePath::has_fog_off().
TypedWritable * FogAttrib::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type FogAttrib is encountered in the Bam file.
It should create the FogAttrib and extract its information from the file.
Definition at line 158 of file fogAttrib.cxx.
References fillin().
Referenced by register_with_read_factory().
void FogAttrib::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type FogAttrib.
Definition at line 113 of file fogAttrib.cxx.
References BamReader::get_factory(), make_from_bam(), and Factory< Type >::register_factory().
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented from RenderAttrib.
Definition at line 124 of file fogAttrib.cxx.
References BamWriter::write_pointer().