Panda3D
bulletTickCallbackData.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file bulletTickCallbackData.h
10  * @author enn0x
11  * @date 2012-11-26
12  */
13 
14 #ifndef __BULLET_TICK_CALLBACK_DATA_H__
15 #define __BULLET_TICK_CALLBACK_DATA_H__
16 
17 #include "pandabase.h"
18 #include "callbackData.h"
19 #include "callbackObject.h"
20 
21 #include "bullet_includes.h"
22 
23 /**
24  *
25  */
26 class EXPCL_PANDABULLET BulletTickCallbackData : public CallbackData {
27 
28 PUBLISHED:
29  INLINE BulletTickCallbackData(btScalar timestep);
30 
31  INLINE PN_stdfloat get_timestep() const;
32 
33  MAKE_PROPERTY(timestep, get_timestep);
34 
35 private:
36  btScalar _timestep;
37 
38 public:
39  static TypeHandle get_class_type() {
40  return _type_handle;
41  }
42  static void init_type() {
43  CallbackData::init_type();
44  register_type(_type_handle, "BulletTickCallbackData",
45  CallbackData::get_class_type());
46  }
47  virtual TypeHandle get_type() const {
48  return get_class_type();
49  }
50  virtual TypeHandle force_init_type() {
51  init_type();
52  return get_class_type();
53  }
54 
55 private:
56  static TypeHandle _type_handle;
57 };
58 
59 #include "bulletTickCallbackData.I"
60 
61 #endif // __BULLET_TICK_CALLBACK_DATA_H__
CallbackData
This is a generic data block that is passed along to a CallbackObject when a callback is made.
Definition: callbackData.h:29
bulletTickCallbackData.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
bullet_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
BulletTickCallbackData
Definition: bulletTickCallbackData.h:26
callbackObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
callbackData.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.