Panda3D
 All Classes Functions Variables Enumerations
bulletContactCallbackData.h
1 // Filename: bulletContactCallbackData.h
2 // Created by: enn0x (22Nov12)
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_CONTACT_CALLBACK_DATA_H__
16 #define __BULLET_CONTACT_CALLBACK_DATA_H__
17 
18 #include "pandabase.h"
19 #include "callbackData.h"
20 #include "callbackObject.h"
21 
22 #include "bullet_includes.h"
23 #include "bullet_utils.h"
24 #include "bulletManifoldPoint.h"
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : BulletContactCallbackData
28 // Description :
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDABULLET BulletContactCallbackData : public CallbackData {
31 
32 PUBLISHED:
34  PandaNode *node0, PandaNode *node1,
35  int id0, int id1,
36  int index0, int index1);
37 
38  INLINE BulletManifoldPoint &get_manifold() const;
39  INLINE PandaNode *get_node0() const;
40  INLINE PandaNode *get_node1() const;
41  INLINE int get_part_id0() const;
42  INLINE int get_part_id1() const;
43  INLINE int get_index0() const;
44  INLINE int get_index1() const;
45 
46 private:
48  PandaNode *_node0;
49  PandaNode *_node1;
50  int _id0;
51  int _id1;
52  int _index0;
53  int _index1;
54 
55 ////////////////////////////////////////////////////////////////////
56 public:
57  static TypeHandle get_class_type() {
58  return _type_handle;
59  }
60  static void init_type() {
61  CallbackData::init_type();
62  register_type(_type_handle, "BulletContactCallbackData",
63  CallbackData::get_class_type());
64  }
65  virtual TypeHandle get_type() const {
66  return get_class_type();
67  }
68  virtual TypeHandle force_init_type() {
69  init_type();
70  return get_class_type();
71  }
72 
73 private:
74  static TypeHandle _type_handle;
75 };
76 
77 #include "bulletContactCallbackData.I"
78 
79 #endif // __BULLET_CONTACT_CALLBACK_DATA_H__
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
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