Based on these observation, we use a hybrid approach that
specializes several earlier algorithms to meet the stringent performance of
haptic rendering. Our framework
utilizes many geometric concepts and data structures from computational
geometry, including spatial partitioning, bounding volume hierarchy and
frame-to-frame coherence.
It decomposes the workspace into uniform grids or cells,
implemented as a hash table to efficiently deal with large storage
requirements. At runtime, the algorithm
can quickly locate the cell containing the path swept out by the probe.
For each cells consisting of a subset of polygons in a virtual
model, we precompute an OBBTree, i.e. hierarchy of oriented bounding
boxes. At runtime, most of the
computation time is spend in finding collisions btw an OBBTree and the path swept out by the tip of the haptic probe
between successive time steps. To
optimize this queries, we have developed a very specialized overlap test
between a line segment and an OBB, that takes just a few operations (42-72,
TXF included).
Typically there is little movement in the probe position between
successive steps. So, our algorithm
take advantage of this motion coherence by caching the previous contact
information to perform incremental computations.