Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pgraph/light.I

Go to the documentation of this file.
00001 // Filename: light.I
00002 // Created by:  drose (26Mar02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 
00020 ////////////////////////////////////////////////////////////////////
00021 //     Function: Light::CData::Constructor
00022 //       Access: Public
00023 //  Description:
00024 ////////////////////////////////////////////////////////////////////
00025 INLINE Light::CData::
00026 CData() :
00027   _color(1.0f, 1.0f, 1.0f, 1.0f),
00028   _viz_geom_stale(true)
00029 {
00030 }
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //     Function: Light::CData::Copy Constructor
00034 //       Access: Public
00035 //  Description:
00036 ////////////////////////////////////////////////////////////////////
00037 INLINE Light::CData::
00038 CData(const Light::CData &copy) :
00039   _color(copy._color),
00040   _viz_geom(copy._viz_geom),
00041   _viz_geom_stale(copy._viz_geom_stale)
00042 {
00043 }
00044 
00045 ////////////////////////////////////////////////////////////////////
00046 //     Function: Light::Constructor
00047 //       Access: Public
00048 //  Description: 
00049 ////////////////////////////////////////////////////////////////////
00050 INLINE Light::
00051 Light() {
00052 }
00053 
00054 ////////////////////////////////////////////////////////////////////
00055 //     Function: Light::Copy Constructor
00056 //       Access: Public
00057 //  Description: 
00058 ////////////////////////////////////////////////////////////////////
00059 INLINE Light::
00060 Light(const Light &copy) :
00061   _cycler(copy._cycler)
00062 {
00063 }
00064 
00065 ////////////////////////////////////////////////////////////////////
00066 //     Function: Light::get_color
00067 //       Access: Published
00068 //  Description: Returns the basic color of the light.
00069 ////////////////////////////////////////////////////////////////////
00070 INLINE const Colorf &Light::
00071 get_color() const {
00072   CDReader cdata(_cycler);
00073   return cdata->_color;
00074 }
00075 
00076 ////////////////////////////////////////////////////////////////////
00077 //     Function: Light::set_color
00078 //       Access: Published
00079 //  Description: Sets the basic color of the light.
00080 ////////////////////////////////////////////////////////////////////
00081 INLINE void Light::
00082 set_color(const Colorf &color) {
00083   CDWriter cdata(_cycler);
00084   cdata->_color = color;
00085   mark_viz_stale();
00086 }
00087 
00088 ////////////////////////////////////////////////////////////////////
00089 //     Function: Light::mark_viz_stale
00090 //       Access: Public
00091 //  Description: Indicates that the internal visualization object will
00092 //               need to be updated.
00093 ////////////////////////////////////////////////////////////////////
00094 INLINE void Light::
00095 mark_viz_stale() {
00096   CDWriter cdata(_cycler);
00097   cdata->_viz_geom_stale = true;
00098 }

Generated on Fri May 2 00:41:43 2003 for Panda by doxygen1.3