Open Dynamics Engine
|
00001 /************************************************************************* 00002 * * 00003 * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * 00004 * All rights reserved. Email: russ@q12.org Web: www.q12.org * 00005 * * 00006 * This library is free software; you can redistribute it and/or * 00007 * modify it under the terms of EITHER: * 00008 * (1) The GNU Lesser General Public License as published by the Free * 00009 * Software Foundation; either version 2.1 of the License, or (at * 00010 * your option) any later version. The text of the GNU Lesser * 00011 * General Public License is included with this library in the * 00012 * file LICENSE.TXT. * 00013 * (2) The BSD-style license that is included with this library in * 00014 * the file LICENSE-BSD.TXT. * 00015 * * 00016 * This library is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * 00019 * LICENSE.TXT and LICENSE-BSD.TXT for more details. * 00020 * * 00021 *************************************************************************/ 00022 00023 #ifndef _ODE_CONTACT_H_ 00024 #define _ODE_CONTACT_H_ 00025 00026 #include <ode/common.h> 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 00033 enum { 00034 dContactMu2 = 0x001, 00035 dContactFDir1 = 0x002, 00036 dContactBounce = 0x004, 00037 dContactSoftERP = 0x008, 00038 dContactSoftCFM = 0x010, 00039 dContactMotion1 = 0x020, 00040 dContactMotion2 = 0x040, 00041 dContactMotionN = 0x080, 00042 dContactSlip1 = 0x100, 00043 dContactSlip2 = 0x200, 00044 00045 dContactApprox0 = 0x0000, 00046 dContactApprox1_1 = 0x1000, 00047 dContactApprox1_2 = 0x2000, 00048 dContactApprox1 = 0x3000 00049 }; 00050 00051 00052 typedef struct dSurfaceParameters { 00053 /* must always be defined */ 00054 int mode; 00055 dReal mu; 00056 00057 /* only defined if the corresponding flag is set in mode */ 00058 dReal mu2; 00059 dReal bounce; 00060 dReal bounce_vel; 00061 dReal soft_erp; 00062 dReal soft_cfm; 00063 dReal motion1,motion2,motionN; 00064 dReal slip1,slip2; 00065 } dSurfaceParameters; 00066 00067 00082 typedef struct dContactGeom { 00083 dVector3 pos; 00084 dVector3 normal; 00085 dReal depth; 00086 dGeomID g1,g2; 00087 int side1,side2; 00088 } dContactGeom; 00089 00090 00091 /* contact info used by contact joint */ 00092 00093 typedef struct dContact { 00094 dSurfaceParameters surface; 00095 dContactGeom geom; 00096 dVector3 fdir1; 00097 } dContact; 00098 00099 00100 #ifdef __cplusplus 00101 } 00102 #endif 00103 00104 #endif