183#ifndef HIDDEN_FROM_DOC
184 struct ShapeInformationItem {
186 float xMin, yMin, zMin;
187 float xMax, yMax, zMax;
190 struct CoupleTableItem {
192 float xMin, yMin, zMin;
193 float xMax, yMax, zMax;
196 struct ActiveListItem {
199 enum Position position;
203 static float m_fIntersectEpsilon;
220 static void initClass();
221 static void exitClass();
234 void* userDataFilterCB;
236 void* userDataIntersectionCB;
237 void* m_callback_list;
245 int shapeInformationSize;
246 int shapeInformationReservedSize;
247 ShapeInformationItem* shapeInformation;
249 int coupleTableReservedSize;
250 CoupleTableItem* coupleTable;
252 int activeListReservedSize;
253 ActiveListItem* activeList;
254 int primitiveTableSize;
255 int primitiveTableReservedSize;
257 int currentShapeIndex1;
258 int currentShapeIndex2;
259 CoupleTableItem* currentCouple;
264 void shapeInformationDestroy();
265 void shapeInformationClear();
266 void shapeInformationAddItem(
SoPath *path);
268 void coupleTableDestroy();
269 void coupleTableClear();
270 CoupleTableItem * coupleTableGetItem(
int shapeIndex1,
int shapeIndex2);
271 void coupleTableSetOverlaping(
int shapeIndex1,
int shapeIndex2,
273 void coupleTableUpdate(
enum Axis axis);
275 void activeListDestroy();
276 void activeListClear();
277 void activeListAddItem(
int shapeIndex);
278 void activeListSort(
int (*compareFunction)(
void const *,
void const *));
279 static int activeListXCompare(
void const *pointer1,
void const *pointer2);
280 static int activeListYCompare(
void const *pointer1,
void const *pointer2);
281 static int activeListZCompare(
void const *pointer1,
void const *pointer2);
282 void activeListClean();
283 void primitiveTableBuild();
284 void primitiveTableDestroy();
285 void primitiveTableClear();
286 void primitiveTableReserveSpace();
294 void shapesCollisionTest(
int shapeIndex1,
int shapeIndex2);
316 static void primitiveTableAddTriangleCB (
void *userData,
322 primitiveTableAddTriangle (action, vertex1, vertex2, vertex3); }
323 static void primitiveTableAddLineSegmentCB (
void *userData,
328 primitiveTableAddLineSegment (action, vertex1, vertex2); }
329 static void triangleCollisionTestCB (
void *userData,
330 SoCallbackAction *action,
331 const SoPrimitiveVertex *vertex1,
332 const SoPrimitiveVertex *vertex2,
333 const SoPrimitiveVertex *vertex3)
335 triangleCollisionTest (action, vertex1, vertex2, vertex3); }
336 static void lineSegmentCollisionTestCB (
void *userData,
337 SoCallbackAction *action,
338 const SoPrimitiveVertex *vertex1,
339 const SoPrimitiveVertex *vertex2)
341 lineSegmentCollisionTest (action, vertex1, vertex2); }
344 void quickSort(
void *array,
int nElm,
int elmSize,
345 int (*compare)(
void const *,
void const *),
347 void sort(
void *array,
int nElm,
int elmSize,
348 int (*compare)(
void const *,
void const *));
350 static SbThreadMutex classMutex;