ODE  0.13.1
 All Data Structures Functions Variables Typedefs Enumerations Groups
contact.h
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
29 extern "C" {
30 #endif
31 
32 
33 enum {
34  dContactMu2 = 0x001,
35  dContactAxisDep = 0x001,
36  dContactFDir1 = 0x002,
37  dContactBounce = 0x004,
38  dContactSoftERP = 0x008,
39  dContactSoftCFM = 0x010,
40  dContactMotion1 = 0x020,
41  dContactMotion2 = 0x040,
42  dContactMotionN = 0x080,
43  dContactSlip1 = 0x100,
44  dContactSlip2 = 0x200,
45  dContactRolling = 0x400,
47  dContactApprox0 = 0x0000,
48  dContactApprox1_1 = 0x1000,
49  dContactApprox1_2 = 0x2000,
50  dContactApprox1_N = 0x4000,
51  dContactApprox1 = 0x7000
52 };
53 
54 
55 typedef struct dSurfaceParameters {
56  /* must always be defined */
57  int mode;
58  dReal mu;
59 
60  /* only defined if the corresponding flag is set in mode */
61  dReal mu2;
62  dReal rho;
63  dReal rho2;
64  dReal rhoN;
65  dReal bounce;
66  dReal bounce_vel;
67  dReal soft_erp;
68  dReal soft_cfm;
69  dReal motion1,motion2,motionN;
70  dReal slip1,slip2;
72 
73 
88 typedef struct dContactGeom {
89  dVector3 pos; /*< contact position*/
90  dVector3 normal; /*< normal vector*/
91  dReal depth; /*< penetration depth*/
92  dGeomID g1,g2; /*< the colliding geoms*/
93  int side1,side2; /*< (to be documented)*/
94 } dContactGeom;
95 
96 
97 /* contact info used by contact joint */
98 
99 typedef struct dContact {
100  dSurfaceParameters surface;
101  dContactGeom geom;
102  dVector3 fdir1;
103 } dContact;
104 
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif
Definition: contact.h:99
dReal bounce
Definition: contact.h:65
Describe the contact point between two geoms.
Definition: contact.h:88
dReal rhoN
Definition: contact.h:64
struct dContactGeom dContactGeom
Describe the contact point between two geoms.
dReal bounce_vel
Definition: contact.h:66
dReal rho
Definition: contact.h:62
Definition: contact.h:55