Code Available

The latest V-COLLIDE source code, version 1.1, was released on February 1, 1998. The C++ code is available in both zipped tar format (1.6 MB) and zip (1.6 MB). It contains source code for the collision detection libraries, brief documentation, and several sample applications, and is freely available for non-commercial use. If you put it to good use, let us know about it.

Previous Versions

V-COLLIDE, version 1.0, was released on June 12, 1997. The C++ code is available in both zipped tar format (1.6 MB) and zip (1.6 MB).

There is absolutely no difference between the APIs for versions 1.0 and versions 1.1. The only difference is in the internal implementation of one of the n-body routines, as a result of which version 1.1 is more robust than version 1.0.

Release Notes

To date, we have tested and verified our systems on these compilers:

Compiler Operating Systems
GNU g++ 2.7.x SGI IRIX 6.2
HP-UX 11.00
Solaris 5.5.1
HP-UX 11.00
Solaris 5.5.1

Future Versions

We plan to include the feature to output a list of intersecting triangle pairs in our future release. For those who cannot wait, here is a brief description of how you may be able to make the necessary modifications.

In VInternal.C, VCInternal::Collide:

// Collision report database.
if (RAPID_num_contacts != 0) {
    report_data.AddPair(i, vc_objects[curr_ovrlp->id]->id);

This fragment records the IDs of the pair of objects. You will need to augment this with the IDs of the triangles on each object. (Since RAPID detects multiple contacts if you change the preceding call to VCInternal::Collide from FIRST_CONTACT to ALL_CONTACTS, you may want to generalize this to a loop if you're doing physical simulation.)

int i;
for (i = 0; i < RAPID_num_contacts; i++) {
    report_data.AddPair(i, RAPID_contact[i].id1, vc_objects[curr_ovrlp->id]->id, RAPID_contact[i].id2);

This gives you (object #1, triangle on object #1, object #2, ... , etc.) for all detected contacts. Of course, this means you need to redefine class PairData. This is a sparse array of the colliding pairs. The correct thing to do is probably to put a linked list of pairs of triangle IDs on class Elem, and maintain that in AddPair.

Finally, redefine VCReportType to contain two triangle IDs, and in VCInternal::Report() fill those in from report_data.arr[]. This requires changing the for-loop. (If you are only detecting FIRST_CONTACT control flow is simpler here.)

Geometric Algorithms for Modeling, Motion, and Animation

Copyright © 1997-1998. Last modified: September 1, 1998.
Maintained by: geom@cs.unc.edu.