294 void* userData = NULL);
351#ifndef HIDDEN_FROM_DOC
353 struct ShapeBBoxInformationItem {
355 float x_min, y_min, z_min;
356 float x_max, y_max, z_max;
359 struct PairTableItem {
361 float x_min, y_min, z_min;
362 float x_max, y_max, z_max;
373 struct ManagerListItem {
374 SoCollisionManager* manager;
375 ManagerListItem* next;
378 class SceneInformationItem {
380 ~SceneInformationItem();
383 SoNodeSensor* sensor;
385 SbBool one_object_has_changed;
388 ManagerListItem* manager_list;
389 int active_manager_count;
392 int shape_bbox_information_reserved_size;
393 ShapeBBoxInformationItem* shape_bbox_information;
395 int pair_table_reserved_size;
396 PairTableItem* pair_table;
399 int comp_list_reserved_size;
400 CompListItem* comp_list;
403 SceneInformationItem* next;
412 SoTransform* m_transform;
416 SbBool m_object_bbox_only;
423 void* m_filter_cb_ud;
424 void* m_bbox_cb_list;
425 void* m_collision_cb_list;
426 void invokeBBoxCallbacks (
const SoPath* p1,
const SoPath* p2);
427 Resp invokeCollisionCallbacks (
const SoCollidingPrimitive*
object,
428 const SoCollidingPrimitive* scene);
432 SbBool m_object_geometry_has_changed;
433 int m_primitive_count;
434 int m_num_primitive_reserved;
435 SoCollidingPrimitive* m_primitives;
436 SoPath* m_current_shape_path;
437 Resp m_upper_response;
440 static SceneInformationItem* m_scene_information_list;
441 SceneInformationItem* m_scene_information;
442 SbBool m_is_a_good_transform;
443 SbBool m_there_is_a_good_transform;
445 SoTransform* m_last_know_good_transform;
446 SoTransform* m_temporary_transform;
447 SoFieldSensor* m_translation_sensor;
448 SoFieldSensor* m_scale_sensor;
449 SoFieldSensor* m_rotation_sensor;
450 SoFieldSensor* m_orientation_sensor;
451 SoFieldSensor* m_center_sensor;
454 PairTableItem* pairTableGetItem (
int shape1,
int shape2);
455 void pairTableCompute (
int (*fct)(
const void*,
const void*),
Axis axis);
456 static int compListXCompare(
const void* v1,
const void* v2);
457 static int compListYCompare(
const void* v1,
const void* v2);
458 static int compListZCompare(
const void* v1,
const void* v2);
460 void addPrimitiveToTable (SoPath* p,
465 void addPrimitiveToTable (SoPath* p,
469 { addPrimitiveToTable (p, type, v1, v2, SbVec3f (0, 0, 0)); }
470 void addTriangleToTable (SoCallbackAction* action,
471 const SoPrimitiveVertex* v1,
472 const SoPrimitiveVertex* v2,
473 const SoPrimitiveVertex* v3);
474 void addSegmentToTable (SoCallbackAction* action,
475 const SoPrimitiveVertex* v1,
476 const SoPrimitiveVertex* v2);
477 void onObjectTriangle (SoCallbackAction* action,
478 const SoPrimitiveVertex* v1,
479 const SoPrimitiveVertex* v2,
480 const SoPrimitiveVertex* v3);
481 void onObjectTriangleReal (
const SbVec3f v0,
484 void onObjectSegment (SoCallbackAction* action,
485 const SoPrimitiveVertex* v1,
486 const SoPrimitiveVertex* v2);
487 SbBool intersectionTwoTriangles (SoCollidingPrimitive* t1,
488 SoCollidingPrimitive* t2);
493 SbBool checkSensor (SoSensor* sensor);
496 static void onSceneChange (
void* ud, SoSensor* sensor);
497 static void refresh (SceneInformationItem* scene);
498 void lastKnowGoodTransformComputing ();
501 static void addTriangleToTableCB (
void* ud, SoCallbackAction* action,
502 const SoPrimitiveVertex* v1,
503 const SoPrimitiveVertex* v2,
504 const SoPrimitiveVertex* v3)
506 static void addSegmentToTableCB (
void* ud, SoCallbackAction* action,
507 const SoPrimitiveVertex* v1,
508 const SoPrimitiveVertex* v2)
511 static void onObjectTriangleCB (
void* ud, SoCallbackAction* action,
512 const SoPrimitiveVertex* v1,
513 const SoPrimitiveVertex* v2,
514 const SoPrimitiveVertex* v3)
516 static void onObjectSegmentCB (
void* ud, SoCallbackAction* action,
517 const SoPrimitiveVertex* v1,
518 const SoPrimitiveVertex* v2)
520 static void onTranslationChangeCB (
void* ud, SoSensor* sensor)
522 static void onScaleChangeCB (
void* ud, SoSensor* sensor)
524 static void onRotationChangeCB (
void* ud, SoSensor* sensor)
526 static void onOrientationChangeCB (
void* ud, SoSensor* sensor)
528 static void onCenterChangeCB (
void* ud, SoSensor* sensor)
530 static void onDraggerMotionCB (
void* ud, SoDragger *)
534 SbVec3f m_dragger_translation;
535 SbRotation m_dragger_rotation;
536 SbVec3f m_dragger_scale_factor;
537 SbRotation m_dragger_scale_orientation;
538 SbVec3f m_dragger_center;
539 void onDraggerMotion ();
542 void quickSort(
void *array,
int nElm,
int elmSize,
543 int (*compare)(
const void*,
const void*),