Panda3D

nodeCullCallbackData.h

00001 // Filename: nodeCullCallbackData.h
00002 // Created by:  drose (13Mar09)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef NODECULLCALLBACKDATA_H
00016 #define NODECULLCALLBACKDATA_H
00017 
00018 #include "pandabase.h"
00019 #include "callbackData.h"
00020 #include "cullTraverser.h"
00021 #include "cullTraverserData.h"
00022 
00023 ////////////////////////////////////////////////////////////////////
00024 //       Class : NodeCullCallbackData
00025 // Description : This kind of CallbackData is passed to the
00026 //               CallbackObject added to
00027 //               CallbackNode:set_cull_callback().
00028 ////////////////////////////////////////////////////////////////////
00029 class EXPCL_PANDA_PGRAPHNODES NodeCullCallbackData : public CallbackData {
00030 public:
00031   INLINE NodeCullCallbackData(CullTraverser *trav, CullTraverserData &data);
00032 
00033 PUBLISHED:
00034   virtual void output(ostream &out) const;
00035 
00036   INLINE CullTraverser *get_trav() const;
00037   INLINE CullTraverserData &get_data() const;
00038 
00039   virtual void upcall();
00040 
00041 private:
00042   CullTraverser *_trav;
00043   CullTraverserData &_data;
00044 
00045 public:
00046   static TypeHandle get_class_type() {
00047     return _type_handle;
00048   }
00049   static void init_type() {
00050     CallbackData::init_type();
00051     register_type(_type_handle, "NodeCullCallbackData",
00052                   CallbackData::get_class_type());
00053   }
00054   virtual TypeHandle get_type() const {
00055     return get_class_type();
00056   }
00057   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00058 
00059 private:
00060   static TypeHandle _type_handle;
00061 };
00062 
00063 #include "nodeCullCallbackData.I"
00064 
00065 #endif
 All Classes Functions Variables Enumerations