00001 #ifndef _MDTBCLCONTACTPARAMS_H 00002 #define _MDTBCLCONTACTPARAMS_H 00003 /* 00004 Copyright 2000 MathEngine 00005 00006 $Name: t-release-0-0-5-msvcrt $ 00007 00008 $Id: MdtBclContactParams.h,v 1.3 2000/07/20 15:45:18 gilesc Exp $ 00009 */ 00010 00011 /** @file 00012 * Constraint Library Contact Parameters. 00013 * 00014 * Definitions of the MdtBclContactParam struct used by MdtBcl Contact. 00015 * This includes friction, restitution, softness, slip, surface velocity etc. 00016 */ 00017 00018 00019 /** 00020 * MdtBcl Contact friction type enum. 00021 */ 00022 typedef enum 00023 { 00024 /** 00025 * Frictionless contact. 00026 */ 00027 MdtContactTypeFrictionZero, 00028 00029 /** 00030 * Friction only along primary direction. 00031 */ 00032 MdtContactTypeFriction1D, 00033 00034 /** 00035 * Friction in both directions. 00036 */ 00037 MdtContactTypeFriction2D, 00038 00039 /** 00040 * Invalid contact type. 00041 */ 00042 MdtContactTypeUnknown = -1 00043 } 00044 MdtContactType; 00045 00046 00047 00048 /** 00049 * MdtBcl Contact options enum. 00050 * 00051 * Contact options such as friction (slipperiness) and restitution 00052 * (bounciness). Any bitwise combination of these options is valid for use 00053 * in 'MdtBclContact.direction'. 00054 * 00055 * @see MdtBclContact 00056 * @see MdtBclContactParams 00057 */ 00058 typedef enum 00059 { 00060 /** 00061 * Use primary direction vector. 00062 * 00063 * Use \a MdtBclContact.direction vector for primary direction 00064 * (otherwise use auto). 00065 */ 00066 MdtBclContactOptionUseDirection = 0x00001, 00067 00068 /** 00069 * Use restitution at the contact. 00070 * 00071 * The restitution factor is specified in \a 00072 * MdtBclContactParams.restitution. 00073 */ 00074 MdtBclContactOptionBounce = 0x00002, 00075 00076 /** 00077 * Use a simple soft contact model.. 00078 * 00079 * The softness factor is specified in \a MdtBclContactParams.softness. 00080 * This factor corresponds to 1/(h.k) in an undamped spring model, 00081 * where h is the timestep and k is the spring stiffness factor. 00082 */ 00083 MdtBclContactOptionSoft = 0x00004, 00084 00085 /** 00086 * Use a simple adhesive contact model. 00087 * 00088 * The maximum adhesive force is specified in \a 00089 * MdtBclContactParams.max_adhesive_force. 00090 */ 00091 MdtBclContactOptionAdhesive = 0x00008, 00092 00093 /** 00094 * Use a first order slip in the primary direction. 00095 * 00096 * The slip velocity is specified in \a MdtBclContactParams.slip1. 00097 */ 00098 MdtBclContactOptionSlip1 = 0x00010, 00099 00100 /** 00101 * Use a first order slip in the secondary direction. 00102 * 00103 * The slip velocity is specified in \a MdtBclContactParams.slip2. 00104 */ 00105 MdtBclContactOptionSlip2 = 0x00020, 00106 00107 /** 00108 * Use a surface velocity in the primary direction (like a conveyor belt 00109 * motion). 00110 * 00111 * The slide velocity is specified in \a MdtBclContactParams.slide1. 00112 */ 00113 MdtBclContactOptionSlide1 = 0x00040, 00114 00115 /** 00116 * Use a surface velocity in the secondary direction. 00117 * 00118 * The secondary slide velocity is specified in \a 00119 * MdtBclContactParams.slide1. 00120 */ 00121 MdtBclContactOptionSlide2 = 0x00080 00122 } 00123 MdtBclContactOption; 00124 00125 /** 00126 * MdtBcl Friction model enum. 00127 * 00128 * Friction model to use along primary or secondary direction. 00129 */ 00130 typedef enum 00131 { 00132 /** 00133 * Box-type friction model. 00134 */ 00135 MdtFrictionModelBox, 00136 00137 /** 00138 * Invalid friction model. 00139 */ 00140 MdtFrictionModelUnknown = -1 00141 } 00142 MdtFrictionModel; 00143 00144 /** 00145 * MdtBcl Contact constraint parameters struct. 00146 * 00147 * If contact type is 1D friction - motion along secondary direction is 00148 * frictionless, and model2, slip2, slide2 and friction2 are ignored. 00149 * 00150 * @see MdtBclContactOption 00151 */ 00152 typedef struct 00153 { 00154 /** 00155 * Contact type (zero, 1D or 2D friction). 00156 */ 00157 MdtContactType type; /* 0x00 */ 00158 00159 /** @var model1 00160 * Friction model to use along primary direction. 00161 */ 00162 /** @var model2 00163 * Friction model to use along secondary direction. 00164 */ 00165 MdtFrictionModel model1; 00166 MdtFrictionModel model2; 00167 00168 /** 00169 * Bitwise combination of MdtBclContactOption's. 00170 * 00171 * @see MdtBclContactOption. 00172 */ 00173 int options; 00174 00175 /** @var restitution 00176 * Restitution parameter. 00177 */ 00178 /** @var velThreshold 00179 * Minimum velocity for restitution. 00180 */ 00181 /** @var softness 00182 * Contact softness parameter (soft mode). 00183 */ 00184 /** @var max_adhesive_force 00185 * Contact maximum adhesive force parameter (adhesive mode). 00186 */ 00187 MeReal restitution; /* 0x10 */ 00188 MeReal velThreshold; 00189 MeReal softness; 00190 MeReal max_adhesive_force; 00191 00192 /** @var friction1 00193 * Max friction force in primary direction. 00194 */ 00195 /** @var slip1 00196 * First order slip in primary direction. 00197 */ 00198 /** @var friction2 00199 * Max friction force in secondary direction. 00200 */ 00201 /** @var slip2 00202 * First order slip in primary direction. 00203 */ 00204 MeReal friction1; /* 0x20 */ 00205 MeReal slip1; 00206 MeReal friction2; 00207 MeReal slip2; 00208 00209 /** @var slide1 00210 * Surface velocity in primary direction. 00211 */ 00212 /** @var slide2 00213 * Surface velocity in secondary direction. 00214 */ 00215 MeReal slide1; /* 0x30 */ 00216 MeReal slide2; 00217 00218 /** 00219 * Padding - not used. 00220 */ 00221 int pad[2]; 00222 } 00223 MdtBclContactParams; 00224 00225 #endif
Copyright MathEngine PLC 2000, all rights reserved.