#include <light.h>
Inheritance diagram for Light:
Public Member Functions | |
Light () | |
Light (const Light ©) | |
virtual | ~Light () |
virtual PandaNode * | as_node ()=0 |
const Colorf & | get_color () const |
Returns the basic color of the light. | |
void | set_color (const Colorf &color) |
Sets the basic color of the light. | |
virtual void | output (ostream &out) const=0 |
virtual void | write (ostream &out, int indent_level) const=0 |
virtual void | bind (GraphicsStateGuardianBase *gsg, int light_id)=0 |
GeomNode * | get_viz () |
Returns a GeomNode that may be rendered to visualize the Light. | |
virtual TypeHandle | get_type () const |
int | get_ref_count () const |
Returns the current reference count. | |
int | ref () const |
Explicitly increments the reference count. | |
int | unref () const |
Explicitly decrements the reference count. | |
void | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
Static Public Member Functions | |
TypeHandle | get_class_type () |
void | init_type () |
Protected Member Functions | |
virtual void | fill_viz_geom (GeomNode *viz_geom) |
Fills the indicated GeomNode up with Geoms suitable for rendering this light. | |
void | mark_viz_stale () |
Indicates that the internal visualization object will need to be updated. | |
void | write_datagram (BamWriter *manager, Datagram &dg) |
Writes the contents of this object to the datagram for shipping out to a Bam file. | |
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 Light. | |
Private Types | |
typedef CycleDataReader< CData > | CDReader |
typedef CycleDataWriter< CData > | CDWriter |
Private Attributes | |
PipelineCycler< CData > | _cycler |
Static Private Attributes | |
TypeHandle | _type_handle |
The actual light objects also inherit from PandaNode, and can therefore be added to the scene graph at some arbitrary point to define the coordinate system of effect.
Definition at line 53 of file light.h.
|
Reimplemented in DirectionalLight, PointLight, and Spotlight. |
|
Reimplemented in DirectionalLight, PointLight, and Spotlight. |
|
Definition at line 61 of file light.I. References _cycler. |
|
|
|
|
|
Implemented in LightLensNode, and LightNode. |
|
Implemented in AmbientLight, DirectionalLight, PointLight, and Spotlight. |
|
Fills the indicated GeomNode up with Geoms suitable for rendering this light.
Reimplemented in Spotlight. |
|
This internal function is called by make_from_bam to read in all of the relevant data from the BamFile for the new Light.
Reimplemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. Definition at line 154 of file light.cxx. Referenced by LightNode::write(), and LightLensNode::write(). |
|
Reimplemented from ReferenceCount. Reimplemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. |
|
Returns the basic color of the light.
Definition at line 87 of file light.I. References _cycler, and INLINE. Referenced by GraphicsStateGuardian::begin_decal_nested(), GLGraphicsStateGuardian::issue_alpha_test(), CRGraphicsStateGuardian::issue_color_write(), GLGraphicsStateGuardian::issue_cull_face(), CRGraphicsStateGuardian::issue_depth_write(), and Spotlight::write(). |
|
Returns the current reference count.
Definition at line 183 of file referenceCount.I. Referenced by RenderState::determine_bin_index(), RenderEffects::determine_show_bounds(), FontPool::ns_garbage_collect(), TexturePool::ns_garbage_collect(), MaterialPool::ns_get_material(), and TexturePool::ns_release_texture(). |
|
Reimplemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. Definition at line 112 of file light.h. Referenced by GraphicsStateGuardian::begin_decal_nested(). |
|
Returns a GeomNode that may be rendered to visualize the Light. This is used during the cull traversal to render the Lights that have been made visible. Definition at line 100 of file light.cxx. References _cycler, and BamWriter::write_cdata(). |
|
Reimplemented from ReferenceCount. Reimplemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. |
|
Indicates that the internal visualization object will need to be updated.
Definition at line 118 of file light.I. Referenced by DirectionalLight::DirectionalLight(), PointLight::PointLight(), and Spotlight::Spotlight(). |
|
Implemented in LightLensNode, and LightNode. |
|
Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 225 of file referenceCount.I. Referenced by ClientDevice::ClientDevice(), EggGroupNode::find_textures(), EggGroupNode::r_apply_texmats(), EggGroupNode::r_flatten_transforms(), and EggGroupNode::reverse_vertex_ordering(). |
|
Sets the basic color of the light.
|
|
Does some easy checks to make sure that the reference count isn't completely bogus.
Definition at line 328 of file referenceCount.I. References INLINE. Referenced by EggNode::determine_bin(), and ReferenceCount::~ReferenceCount(). |
|
Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete(). User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it. The return value is the new reference count. Definition at line 293 of file referenceCount.I. References INLINE. Referenced by RenderState::determine_bin_index(), and RenderEffects::determine_show_bounds(). |
|
Implemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. |
|
Writes the contents of this object to the datagram for shipping out to a Bam file.
Reimplemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. Definition at line 137 of file light.cxx. Referenced by LightNode::output(), and LightLensNode::output(). |
|
Reimplemented in DirectionalLight, PointLight, and Spotlight. Definition at line 95 of file light.h. Referenced by get_color(), get_viz(), and Light(). |
|
Reimplemented from ReferenceCount. Reimplemented in AmbientLight, DirectionalLight, LightLensNode, LightNode, PointLight, and Spotlight. |