Panda3D
geomDrawCallbackData.h
1 // Filename: geomDrawCallbackData.h
2 // Created by: drose (13Mar09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef GEOMDRAWCALLBACKDATA_H
16 #define GEOMDRAWCALLBACKDATA_H
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 
21 // Forward declarations
22 class CullableObject;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : GeomDrawCallbackData
27 // Description : This specialization on CallbackData is passed when
28 // the callback is initiated from deep within the draw
29 // traversal, for a particular Geom.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDA_PGRAPH GeomDrawCallbackData : public CallbackData {
32 public:
34  GraphicsStateGuardianBase *gsg, bool force);
35 
36 PUBLISHED:
37  virtual void output(ostream &out) const;
38 
39  INLINE CullableObject *get_object() const;
40  INLINE GraphicsStateGuardianBase *get_gsg() const;
41  INLINE bool get_force() const;
42 
43  INLINE void set_lost_state(bool lost_state);
44  INLINE bool get_lost_state() const;
45 
46  virtual void upcall();
47 
48 private:
49  CullableObject *_obj;
51  bool _force;
52  bool _lost_state;
53 
54 public:
55  static TypeHandle get_class_type() {
56  return _type_handle;
57  }
58  static void init_type() {
59  CallbackData::init_type();
60  register_type(_type_handle, "GeomDrawCallbackData",
61  CallbackData::get_class_type());
62  }
63  virtual TypeHandle get_type() const {
64  return get_class_type();
65  }
66  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
67 
68 private:
69  static TypeHandle _type_handle;
70 };
71 
72 #include "geomDrawCallbackData.I"
73 
74 #endif
This specialization on CallbackData is passed when the callback is initiated from deep within the dra...
virtual void upcall()
You should make this call during the callback if you want to continue the normal function that would ...
This is a generic data block that is passed along to a CallbackObject when a callback is made...
Definition: callbackData.h:32
The smallest atom of cull.
This is a base class for the GraphicsStateGuardian class, which is itself a base class for the variou...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85