Panda3D
bulletContactCallbackData.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 bulletContactCallbackData.h
10  * @author enn0x
11  * @date 2012-11-22
12  */
13 
14 #ifndef __BULLET_CONTACT_CALLBACK_DATA_H__
15 #define __BULLET_CONTACT_CALLBACK_DATA_H__
16 
17 #include "pandabase.h"
18 #include "callbackData.h"
19 #include "callbackObject.h"
20 
21 #include "bullet_includes.h"
22 #include "bullet_utils.h"
23 #include "bulletManifoldPoint.h"
24 
25 /**
26  *
27  */
28 class EXPCL_PANDABULLET BulletContactCallbackData : public CallbackData {
29 
30 PUBLISHED:
32  PandaNode *node0, PandaNode *node1,
33  int id0, int id1,
34  int index0, int index1);
35 
36  INLINE BulletManifoldPoint &get_manifold() const;
37  INLINE PandaNode *get_node0() const;
38  INLINE PandaNode *get_node1() const;
39  INLINE int get_part_id0() const;
40  INLINE int get_part_id1() const;
41  INLINE int get_index0() const;
42  INLINE int get_index1() const;
43 
44  MAKE_PROPERTY(manifold, get_manifold);
45  MAKE_PROPERTY(node0, get_node0);
46  MAKE_PROPERTY(node1, get_node1);
47  MAKE_PROPERTY(part_id0, get_part_id0);
48  MAKE_PROPERTY(part_id1, get_part_id1);
49  MAKE_PROPERTY(index0, get_index0);
50  MAKE_PROPERTY(index1, get_index1);
51 
52 private:
54  PandaNode *_node0;
55  PandaNode *_node1;
56  int _id0;
57  int _id1;
58  int _index0;
59  int _index1;
60 
61 public:
62  static TypeHandle get_class_type() {
63  return _type_handle;
64  }
65  static void init_type() {
66  CallbackData::init_type();
67  register_type(_type_handle, "BulletContactCallbackData",
68  CallbackData::get_class_type());
69  }
70  virtual TypeHandle get_type() const {
71  return get_class_type();
72  }
73  virtual TypeHandle force_init_type() {
74  init_type();
75  return get_class_type();
76  }
77 
78 private:
79  static TypeHandle _type_handle;
80 };
81 
83 
84 #endif // __BULLET_CONTACT_CALLBACK_DATA_H__
BulletContactCallbackData
Definition: bulletContactCallbackData.h:28
CallbackData
This is a generic data block that is passed along to a CallbackObject when a callback is made.
Definition: callbackData.h:29
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
bullet_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletManifoldPoint
Definition: bulletManifoldPoint.h:27
bulletManifoldPoint.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bulletContactCallbackData.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
callbackObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PandaNode
A basic node of the scene graph or data graph.
Definition: pandaNode.h:64
callbackData.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.