Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
AmbientLight Class Reference

A light source that seems to illuminate all points in space at once. More...

#include "ambientLight.h"

Inheritance diagram for AmbientLight:
LightNode Light PandaNode ReferenceCount TypedWritable Namable LinkedListNode ReferenceCount MemoryBase TypedObject MemoryBase MemoryBase MemoryBase

List of all members.

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 PandaNodemake_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 &copy)
 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 TypedWritablemake_from_bam (const FactoryParams &params)
 This function is called by the BamReader's factory when a new object of type AmbientLight is encountered in the Bam file.

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

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().

void AmbientLight::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 LightNode.

Definition at line 129 of file ambientLight.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations