LightSource.h

Go to the documentation of this file.
00001 /* $Id:$ */
00002 
00003 #ifndef __LIGHT_SOURCE_H
00004 #define __LIGHT_SOURCE_H
00005 
00006 #include <esg/Shape.h>
00007 #include <esg/emittance/Emittance.h>
00008 
00009 namespace esg {
00010 
00015 class LightSource : public Shape {
00016 public:
00024         LightSource (OID          oid,
00025                      const char * name,
00026                      Emittance  * pEm)
00027             : Shape(oid, name) {
00028             _pEmittance = pEm;
00029         }
00030 
00038         LightSource (OID                  oid,
00039                      const char         * name,
00040                      AutoPtr<Emittance> * pEm)
00041             : Shape(oid, name) {
00042             if (pEm) { 
00043                 _pAutoEmittance = pEm;
00044                 _pEmittance     = _pAutoEmittance->origObject();
00045             }
00046         }
00047 
00053         virtual bool supportsEnergy (void) { return _tangible; }
00054 
00061         virtual void setEnergyState (AutoPtr<EnergyCoat>* e) {
00062             if (_tangible) Shape::setEnergyState(e);
00063         }
00064 };
00065     
00066 }; // namespace 
00067 
00068 #endif // __LIGHT_SOURCE_H

Generated on Wed Jun 28 12:24:28 2006 for esg by  doxygen 1.4.6