Panda3D

geomDrawCallbackData.h

00001 // Filename: geomDrawCallbackData.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 GEOMDRAWCALLBACKDATA_H
00016 #define GEOMDRAWCALLBACKDATA_H
00017 
00018 #include "pandabase.h"
00019 #include "callbackData.h"
00020 
00021 ////////////////////////////////////////////////////////////////////
00022 //       Class : GeomDrawCallbackData
00023 // Description : This specialization on CallbackData is passed when
00024 //               the callback is initiated from deep within the draw
00025 //               traversal, for a particular Geom.
00026 ////////////////////////////////////////////////////////////////////
00027 class EXPCL_PANDA_PGRAPH GeomDrawCallbackData : public CallbackData {
00028 public:
00029   INLINE GeomDrawCallbackData(CullableObject *obj, 
00030                               GraphicsStateGuardianBase *gsg, bool force);
00031 
00032 PUBLISHED:
00033   virtual void output(ostream &out) const;
00034 
00035   INLINE CullableObject *get_object() const;
00036   INLINE GraphicsStateGuardianBase *get_gsg() const;
00037   INLINE bool get_force() const;
00038 
00039   INLINE void set_lost_state(bool lost_state);
00040   INLINE bool get_lost_state() const;
00041 
00042   virtual void upcall();
00043 
00044 private:
00045   CullableObject *_obj;
00046   GraphicsStateGuardianBase *_gsg;
00047   bool _force;
00048   bool _lost_state;
00049 
00050 public:
00051   static TypeHandle get_class_type() {
00052     return _type_handle;
00053   }
00054   static void init_type() {
00055     CallbackData::init_type();
00056     register_type(_type_handle, "GeomDrawCallbackData",
00057                   CallbackData::get_class_type());
00058   }
00059   virtual TypeHandle get_type() const {
00060     return get_class_type();
00061   }
00062   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00063 
00064 private:
00065   static TypeHandle _type_handle;
00066 };
00067 
00068 #include "geomDrawCallbackData.I"
00069 
00070 #endif
 All Classes Functions Variables Enumerations