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

panda/src/shader/casterShader.h

Go to the documentation of this file.
00001 // Filename: casterShader.h
00002 // Created by:  mike (09Jan97)
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 #ifndef CASTERSHADER_H
00019 #define CASTERSHADER_H
00020 //
00021 ////////////////////////////////////////////////////////////////////
00022 // Includes
00023 ////////////////////////////////////////////////////////////////////
00024 #include <pandabase.h>
00025 
00026 #include "shader.h"
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 // Defines
00030 ////////////////////////////////////////////////////////////////////
00031 
00032 ////////////////////////////////////////////////////////////////////
00033 //       Class : CasterShader
00034 // Description : Frustum Shader that computes effect based on a list
00035 //               of "casting" objects
00036 ////////////////////////////////////////////////////////////////////
00037 class EXPCL_SHADER CasterShader : public FrustumShader
00038 {
00039   protected:
00040 
00041     CasterShader(void) : FrustumShader() { }
00042 
00043   public:
00044 
00045     virtual ~CasterShader(void) { }
00046 
00047     INLINE int get_num_casters(void) const { return _casters.size(); }
00048     INLINE int add_caster(NamedNode* node);
00049     INLINE int remove_caster(NamedNode* node);
00050 
00051     typedef pvector<NamedNode *> NamedNodeVector;
00052 
00053   protected:
00054 
00055     NamedNodeVector                     _casters;
00056 
00057   public:
00058 
00059     static TypeHandle get_class_type() {
00060       return _type_handle;
00061     }
00062     static void init_type() {
00063       FrustumShader::init_type();
00064       register_type(_type_handle, "CasterShader",
00065                           FrustumShader::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 
00074     static TypeHandle _type_handle;
00075 };
00076 
00077 #include "casterShader.I"
00078 
00079 #endif

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