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

panda/src/pgraph/lightNode.h

Go to the documentation of this file.
00001 // Filename: lightNode.h
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 #ifndef LIGHTNODE_H
00020 #define LIGHTNODE_H
00021 
00022 #include "pandabase.h"
00023 
00024 #include "light.h"
00025 #include "pandaNode.h"
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : LightNode
00029 // Description : A derivative of Light and of PandaNode.  All kinds of
00030 //               Light except Spotlight (which must inherit from
00031 //               LensNode instead) inherit from this class.
00032 ////////////////////////////////////////////////////////////////////
00033 class EXPCL_PANDA LightNode : public Light, public PandaNode {
00034 PUBLISHED:
00035   LightNode(const string &name);
00036 
00037 protected:
00038   LightNode(const LightNode &copy);
00039 
00040 public:
00041   virtual PandaNode *as_node();
00042   virtual Light *as_light();
00043 
00044 PUBLISHED:
00045   // We have to explicitly publish these because they resolve the
00046   // multiple inheritance.
00047   virtual void output(ostream &out) const;
00048   virtual void write(ostream &out, int indent_level = 0) const;
00049 
00050 public:
00051   virtual void write_datagram(BamWriter *manager, Datagram &dg);
00052 
00053 protected:
00054   void fillin(DatagramIterator &scan, BamReader *manager);
00055 
00056 public:
00057   static TypeHandle get_class_type() {
00058     return _type_handle;
00059   }
00060   static void init_type() {
00061     Light::init_type();
00062     PandaNode::init_type();
00063     register_type(_type_handle, "LightNode",
00064                   Light::get_class_type(),
00065                   PandaNode::get_class_type());
00066   }
00067   virtual TypeHandle get_type() const {
00068     return get_class_type();
00069   }
00070   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00071 
00072 private:
00073   static TypeHandle _type_handle;
00074 };
00075 
00076 INLINE ostream &operator << (ostream &out, const LightNode &light) {
00077   light.output(out);
00078   return out;
00079 }
00080 
00081 #include "lightNode.I"
00082 
00083 #endif

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