Panda3D
|
A light source that seems to illuminate all points in space at once. More...
#include "ambientLight.h"
Public Member Functions | |
AmbientLight (const string &name) | |
virtual void | bind (GraphicsStateGuardianBase *gsg, const NodePath &light, int light_id) |
virtual TypeHandle | force_init_type () |
virtual int | get_class_priority () const |
Returns the relative priority associated with all lights of this class. | |
virtual TypeHandle | get_type () const |
virtual bool | is_ambient_light () const |
Returns true if this is an AmbientLight, false if it is some other kind of light. | |
virtual PandaNode * | make_copy () const |
Returns a newly-allocated PandaNode that is a shallow copy of this one. | |
virtual void | write (ostream &out, int indent_level) 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 TypeHandle | get_class_type () |
static void | init_type () |
static void | register_with_read_factory () |
Tells the BamReader how to create objects of type AmbientLight. | |
Protected Member Functions | |
AmbientLight (const AmbientLight ©) | |
Do not call the copy constructor directly; instead, use make_copy() or copy_subgraph() to make a copy of a node. | |
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 AmbientLight. | |
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 AmbientLight is encountered in the Bam file. |
A light source that seems to illuminate all points in space at once.
This kind of light need not actually be part of the scene graph, since it has no meaningful position.
Definition at line 29 of file ambientLight.h.
AmbientLight::AmbientLight | ( | const AmbientLight & | copy | ) | [protected] |
Do not call the copy constructor directly; instead, use make_copy() or copy_subgraph() to make a copy of a node.
Definition at line 42 of file ambientLight.cxx.
void AmbientLight::fillin | ( | DatagramIterator & | scan, |
BamReader * | manager | ||
) | [protected] |
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new AmbientLight.
Reimplemented from LightNode.
Definition at line 161 of file ambientLight.cxx.
Referenced by make_from_bam().
int AmbientLight::get_class_priority | ( | ) | const [virtual] |
Returns the relative priority associated with all lights of this class.
This priority is used to order lights whose instance priority (get_priority()) is the same--the idea is that other things being equal, AmbientLights (for instance) are less important than DirectionalLights.
Implements Light.
Definition at line 58 of file ambientLight.cxx.
bool AmbientLight::is_ambient_light | ( | ) | const [virtual] |
Returns true if this is an AmbientLight, false if it is some other kind of light.
Reimplemented from Light.
Definition at line 95 of file ambientLight.cxx.
PandaNode * AmbientLight::make_copy | ( | ) | const [virtual] |
Returns a newly-allocated PandaNode that is a shallow copy of this one.
It will be a different pointer, but its internal data may or may not be shared with that of the original PandaNode. No children will be copied.
Reimplemented from PandaNode.
Definition at line 72 of file ambientLight.cxx.
TypedWritable * AmbientLight::make_from_bam | ( | const FactoryParams & | params | ) | [static, protected] |
This function is called by the BamReader's factory when a new object of type AmbientLight is encountered in the Bam file.
It should create the AmbientLight and extract its information from the file.
Reimplemented from PandaNode.
Definition at line 142 of file ambientLight.cxx.
References fillin().
Referenced by register_with_read_factory().
void AmbientLight::register_with_read_factory | ( | ) | [static] |
Tells the BamReader how to create objects of type AmbientLight.
Reimplemented from PandaNode.
Definition at line 118 of file ambientLight.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 LightNode.
Definition at line 129 of file ambientLight.cxx.