00001 // Filename: showBoundsEffect.h 00002 // Created by: drose (25Mar02) 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 SHOWBOUNDSEFFECT_H 00020 #define SHOWBOUNDSEFFECT_H 00021 00022 #include "pandabase.h" 00023 00024 #include "renderEffect.h" 00025 00026 //////////////////////////////////////////////////////////////////// 00027 // Class : ShowBoundsEffect 00028 // Description : Applied to a GeomNode to cause a visible bounding 00029 // volume to be drawn for this node. This is generally 00030 // used only during development to help identify 00031 // bounding volume issues. 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_PANDA ShowBoundsEffect : public RenderEffect { 00034 private: 00035 INLINE ShowBoundsEffect(); 00036 00037 PUBLISHED: 00038 static CPT(RenderEffect) make(); 00039 00040 protected: 00041 virtual bool safe_to_combine() const; 00042 virtual int compare_to_impl(const RenderEffect *other) const; 00043 virtual RenderEffect *make_default_impl() const; 00044 00045 public: 00046 static void register_with_read_factory(); 00047 virtual void write_datagram(BamWriter *manager, Datagram &dg); 00048 00049 protected: 00050 static TypedWritable *make_from_bam(const FactoryParams ¶ms); 00051 void fillin(DatagramIterator &scan, BamReader *manager); 00052 00053 public: 00054 static TypeHandle get_class_type() { 00055 return _type_handle; 00056 } 00057 static void init_type() { 00058 RenderEffect::init_type(); 00059 register_type(_type_handle, "ShowBoundsEffect", 00060 RenderEffect::get_class_type()); 00061 } 00062 virtual TypeHandle get_type() const { 00063 return get_class_type(); 00064 } 00065 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00066 00067 private: 00068 static TypeHandle _type_handle; 00069 }; 00070 00071 #include "showBoundsEffect.I" 00072 00073 #endif 00074