Panda3D
 All Classes Functions Variables Enumerations
odeUtil.h
1 // Filename: odeUtil.h
2 // Created by: joswilso (27Dec06)
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 ODEUTIL_H
16 #define ODEUTIL_H
17 
18 #include "pandabase.h"
19 #include "typedObject.h"
20 #include "luse.h"
21 
22 #include "ode_includes.h"
23 #include "odeJointCollection.h"
24 #include "odeCollisionEntry.h"
25 
26 class OdeBody;
27 class OdeJoint;
28 class OdeGeom;
29 
30 ////////////////////////////////////////////////////////////////////
31 // Class : OdeUtil
32 // Description :
33 ////////////////////////////////////////////////////////////////////
34 class EXPCL_PANDAODE OdeUtil {
35 PUBLISHED:
36  static OdeJoint get_connecting_joint(const OdeBody &body1,
37  const OdeBody &body2);
38  static OdeJointCollection get_connecting_joint_list(const OdeBody &body1,
39  const OdeBody &body2);
40  static int are_connected(const OdeBody &body1,
41  const OdeBody &body2);
42  static int are_connected_excluding(const OdeBody &body1,
43  const OdeBody &body2,
44  const int joint_type);
45  static PT(OdeCollisionEntry) collide(const OdeGeom &geom1, const OdeGeom &geom2,
46  const short int max_contacts = 150);
47 
48  EXTENSION(static int collide2(const OdeGeom &geom1, const OdeGeom &geom2,
49  PyObject* arg, PyObject* callback));
50 
51  static OdeGeom space_to_geom(const OdeSpace &space);
52 
53  static dReal OC_infinity;
54 
55  // RAU we can't access OC_infinity as constants are not exposed in python
56  static dReal get_infinity() {return OC_infinity;};
57 
58  static int rand_get_seed() {return dRandGetSeed();};
59 
60  static void rand_set_seed(int s) {dRandSetSeed(s);};
61 };
62 
63 #endif
A class used to hold information about a collision that has occurred.