Author: Melinda Green
Description: Random useful source code
Keywords: free source code, R-Tree, skiplist, quaternion, intersection test, C++, class library

Free Source Code

Xastir note: This file is intended to point you at the original sources of the rtree implementation used in xastir.]

Here are a few useful bits of free source code. You're completely free to use them for any purpose whatsoever. All I ask is that if you find one to be particularly valuable, then consider sending a brief thank you note to the email address in the code comments. Enjoy.

- [java links deleted -- visit original web site for that information]
- C & C++

C & C++ Code

R-Trees

Straight "C" implementation of Tony Gutman's R-Tree method, R-Trees provide Log(n) speed rectangular indexing into multi-dimensional data. Based on his original implementation, I've brought it up to date with ANCI specifications and added a nice improvement based on sphere volumes.

Download R-Tree code

Skiplists

Skiplists are fast associative collections invented by William Pugh. Key/Value pairs are added to skiplist containers and can then values looked up extremely quickly by key. The implementation is based on a fairly generic one originally in "C" by Bruno Grossniklaus which I converted into a C++ class library.

Download SkipList code

Quaternions

Implementation of a simple C++ quaternion class called "Squat". Popularized by a seminal paper by Ken Shoemake, a quaternion represents a rotation about an axis. Squats can be concatenated together via the `*` and `*=` operators and converted back and forth between transformation matrices. Implementation also includes a wonderful 3D vector macro library by Don Hatch.

Download Squat code

Polygon-Cube Intersection Testing

"C" implementation of an extremely fast and robust polygon-cube intersection test by Don Hatch and myself as published in Graphics Gems V. Very useful for collision detection and view frustum visibility checking.

View the readme file
Download PCube code

Back to the Superliminal home page.