This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.
Three new classes are provided to support detection of collisions in Open Inventor 2.4.
This method prevents the camera from crossing walls or floors making
viewer manipulation much more comfortable and realistic. To use this class,
first create a standard viewer and then a SoXtCollisionViewer
for this viewer. Collision detection will be activated immediately. The
minimum distance between the camera and the object can be tuned. A user
callback function can be set to receive a notification when a collision
is detected. See SoXtCollisionViewer for
more information. A program demonstrates how to use this class: $OIVHOME/src/TGSdemos/
Collision/Viewer
This class is useful to monitor the transformations of an object relatively
to a scene graph. It can prevent this object from being in collision with
other shapes of the scene or it can glue the object on the surface of the
shapes it is in collision with or it can just call a user callback function.
The gluing process tries to find the closest position where the objects
do not collide. The number of positions to try can be tuned. Collision
detection can be computed only on bounding boxes for the object or for
the whole scene shapes. When a bounding box collision occurs between two
shapes, a user filter function is called. This function can stop the detection
process for these two shapes. The second step of the collision detection
mechanism consists in comparing each triangle of both shapes. If a triangle
collision is found, the collision manager calls the user callbacks. Each
callback is able to inform the manager if it is interested in the next
collision report for the current transformation. It can be informed of
the collision for the next graphic primitive or only for the next shapes
or it can just say that it is not interested in the next collision reports
for the current transformation. Collisions are detected even if objects
are not visible or not pickable. See SoCollisionManager
for more information. Two programs demonstrate how to use this class: $OIVHOME/src/TGSdemos/
Collision/Dart and $OIVHOME/src/TGSdemos/Collision/ObjectMoving