Open Dynamics Engine
|
00001 /************************************************************************* 00002 * * 00003 * Open Dynamics Engine, Copyright (C) 2001-2003 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_COLLISION_SPACE_H_ 00024 #define _ODE_COLLISION_SPACE_H_ 00025 00026 #include <ode/common.h> 00027 00028 #ifdef __cplusplus 00029 extern "C" { 00030 #endif 00031 00032 struct dContactGeom; 00033 00049 typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); 00050 00051 00052 ODE_API dSpaceID dSimpleSpaceCreate (dSpaceID space); 00053 ODE_API dSpaceID dHashSpaceCreate (dSpaceID space); 00054 ODE_API dSpaceID dQuadTreeSpaceCreate (dSpaceID space, const dVector3 Center, const dVector3 Extents, int Depth); 00055 00056 00057 // SAP 00058 // Order XZY or ZXY usually works best, if your Y is up. 00059 #define dSAP_AXES_XYZ ((0)|(1<<2)|(2<<4)) 00060 #define dSAP_AXES_XZY ((0)|(2<<2)|(1<<4)) 00061 #define dSAP_AXES_YXZ ((1)|(0<<2)|(2<<4)) 00062 #define dSAP_AXES_YZX ((1)|(2<<2)|(0<<4)) 00063 #define dSAP_AXES_ZXY ((2)|(0<<2)|(1<<4)) 00064 #define dSAP_AXES_ZYX ((2)|(1<<2)|(0<<4)) 00065 00066 ODE_API dSpaceID dSweepAndPruneSpaceCreate( dSpaceID space, int axisorder ); 00067 00068 00069 00070 ODE_API void dSpaceDestroy (dSpaceID); 00071 00072 ODE_API void dHashSpaceSetLevels (dSpaceID space, int minlevel, int maxlevel); 00073 ODE_API void dHashSpaceGetLevels (dSpaceID space, int *minlevel, int *maxlevel); 00074 00075 ODE_API void dSpaceSetCleanup (dSpaceID space, int mode); 00076 ODE_API int dSpaceGetCleanup (dSpaceID space); 00077 00100 ODE_API void dSpaceSetSublevel (dSpaceID space, int sublevel); 00101 00114 ODE_API int dSpaceGetSublevel (dSpaceID space); 00115 00116 00133 ODE_API void dSpaceSetManualCleanup (dSpaceID space, int mode); 00134 00147 ODE_API int dSpaceGetManualCleanup (dSpaceID space); 00148 00149 ODE_API void dSpaceAdd (dSpaceID, dGeomID); 00150 ODE_API void dSpaceRemove (dSpaceID, dGeomID); 00151 ODE_API int dSpaceQuery (dSpaceID, dGeomID); 00152 ODE_API void dSpaceClean (dSpaceID); 00153 ODE_API int dSpaceGetNumGeoms (dSpaceID); 00154 ODE_API dGeomID dSpaceGetGeom (dSpaceID, int i); 00155 00176 ODE_API int dSpaceGetClass(dSpaceID space); 00177 00178 #ifdef __cplusplus 00179 } 00180 #endif 00181 00182 #endif