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