Panda3D
bulletTickCallbackData.h
1 // Filename: bulletTickCallbackData.h
2 // Created by: enn0x (26Nov12)
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 __BULLET_TICK_CALLBACK_DATA_H__
16 #define __BULLET_TICK_CALLBACK_DATA_H__
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 #include "callbackObject.h"
21 
22 #include "bullet_includes.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : BulletTickCallbackData
26 // Description :
27 ////////////////////////////////////////////////////////////////////
28 class EXPCL_PANDABULLET BulletTickCallbackData : public CallbackData {
29 
30 PUBLISHED:
31  INLINE BulletTickCallbackData(btScalar timestep);
32 
33  INLINE PN_stdfloat get_timestep() const;
34 
35 private:
36  btScalar _timestep;
37 
38 ////////////////////////////////////////////////////////////////////
39 public:
40  static TypeHandle get_class_type() {
41  return _type_handle;
42  }
43  static void init_type() {
44  CallbackData::init_type();
45  register_type(_type_handle, "BulletTickCallbackData",
46  CallbackData::get_class_type());
47  }
48  virtual TypeHandle get_type() const {
49  return get_class_type();
50  }
51  virtual TypeHandle force_init_type() {
52  init_type();
53  return get_class_type();
54  }
55 
56 private:
57  static TypeHandle _type_handle;
58 };
59 
60 #include "bulletTickCallbackData.I"
61 
62 #endif // __BULLET_TICK_CALLBACK_DATA_H__
This is a generic data block that is passed along to a CallbackObject when a callback is made...
Definition: callbackData.h:32
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85