RobotLocomotion/drake — pull request #439 by RussTedrake (2014-09-28 22:17:27+00:00)
Title: Major cleanup / update to RigidBodyHeightMapTerrain

- height maps use barycentric c++ code for interpolation now. this could still be made faster (doing a linear search instead of something smarter), but hey - it's in C so fast compared to everything else we've had.
- adds support for viewing heightmaps in drake_viewer (and hopefully also drake director) by exporting obj files on the fly. vectorized that file write so it's pretty fast. the terrain test examples look so much better now.
- breaks support for terrain map visualization in vrml. :( i spent a LONG time trying to get it right, but had to call it. i must be tired. (the essential problem is that the vrml viewer uses Z up coordinates, and elevation grids are defined with height in y, so it requires some combination of rotations and transforms to get everything right... including the normals.). i'll open a bug.
- resolves #275 (sorry Scott V) and a bug for the gradients of barycentric interpolation when pts were off the grid.

the result is full support for big terrain files like we used in littledog:
![2014-09-28-viewer 00](https://cloud.githubusercontent.com/assets/6442292/4435885/98401164-475c-11e4-9edf-daebed199c13.jpg)