source: GTP/trunk/App/Demos/Geom/OgreStuff/include/ode/contact.h @ 1812

Revision 1812, 2.7 KB checked in by gumbau, 18 years ago (diff)
RevLine 
[1812]1/*************************************************************************
2 *                                                                       *
3 * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.       *
4 * All rights reserved.  Email: russ@q12.org   Web: www.q12.org          *
5 *                                                                       *
6 * This library is free software; you can redistribute it and/or         *
7 * modify it under the terms of EITHER:                                  *
8 *   (1) The GNU Lesser General Public License as published by the Free  *
9 *       Software Foundation; either version 2.1 of the License, or (at  *
10 *       your option) any later version. The text of the GNU Lesser      *
11 *       General Public License is included with this library in the     *
12 *       file LICENSE.TXT.                                               *
13 *   (2) The BSD-style license that is included with this library in     *
14 *       the file LICENSE-BSD.TXT.                                       *
15 *                                                                       *
16 * This library is distributed in the hope that it will be useful,       *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files    *
19 * LICENSE.TXT and LICENSE-BSD.TXT for more details.                     *
20 *                                                                       *
21 *************************************************************************/
22
23#ifndef _ODE_CONTACT_H_
24#define _ODE_CONTACT_H_
25
26#include <ode/common.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32
33enum {
34  dContactMu2           = 0x001,
35  dContactFDir1         = 0x002,
36  dContactBounce        = 0x004,
37  dContactSoftERP       = 0x008,
38  dContactSoftCFM       = 0x010,
39  dContactMotion1       = 0x020,
40  dContactMotion2       = 0x040,
41  dContactSlip1         = 0x080,
42  dContactSlip2         = 0x100,
43
44  dContactApprox0       = 0x0000,
45  dContactApprox1_1     = 0x1000,
46  dContactApprox1_2     = 0x2000,
47  dContactApprox1       = 0x3000
48};
49
50
51typedef struct dSurfaceParameters {
52  /* must always be defined */
53  int mode;
54  dReal mu;
55
56  /* only defined if the corresponding flag is set in mode */
57  dReal mu2;
58  dReal bounce;
59  dReal bounce_vel;
60  dReal soft_erp;
61  dReal soft_cfm;
62  dReal motion1,motion2;
63  dReal slip1,slip2;
64} dSurfaceParameters;
65
66
67/* contact info set by collision functions */
68
69typedef struct dContactGeom {
70  dVector3 pos;
71  dVector3 normal;
72  dReal depth;
73  dGeomID g1,g2;
74} dContactGeom;
75
76
77/* contact info used by contact joint */
78
79typedef struct dContact {
80  dSurfaceParameters surface;
81  dContactGeom geom;
82  dVector3 fdir1;
83} dContact;
84
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif
Note: See TracBrowser for help on using the repository browser.