function Heightfield(data, options){
    options = Utils.defaults(options, {
        maxValue : null,
        minValue : null,
        elementSize : 1
    });

    /**
     * An array of numbers, or height values, that are spread out along the x axis.
     * @property {array} data
     */
    this.data = data;

    /**
     * Max value of the data
     * @property {number} maxValue
     */
    this.maxValue = options.maxValue;

    /**
     * Max value of the data
     * @property {number} minValue
     */
    this.minValue = options.minValue;

    /**
     * The width of each element
     * @property {number} elementSize
     * @todo elementSizeX and Y
     */
    this.elementSize = options.elementSize;

    if(options.minValue === null){
        this.updateMinValue();
    }
    if(options.maxValue === null){
        this.updateMaxValue();
    }

    this.cacheEnabled = true;

    Shape.call(this);

    this.pillarConvex = new ConvexPolyhedron();
    this.pillarOffset = new Vec3();

    this.type = Shape.types.HEIGHTFIELD;
    this.updateBoundingSphereRadius();

    // "i_j_isUpper" => { convex: ..., offset: ... }
    // for example:
    // _cachedPillars["0_2_1"]
    this._cachedPillars = {};
}
Heightfield shape class. Height data is given as an array. These data points are spread out evenly with a given distance.
@class Heightfield
@extends Shape
@constructor
@param {Array} data An array of Y values that will be used to construct the terrain.
@param {object} options
@param {Number} [options.minValue] Minimum value of the data points in the data array. Will be computed automatically if not given.
@param {Number} [options.maxValue] Maximum value.
@param {Number} [options.elementSize=0.1] World spacing between the data points in X direction.
@todo Should be possible to use along all axes, not just y

@example
    // Generate some height data (y-values).
    var data = [];
    for(var i = 0; i < 1000; i++){
        var y = 0.5 * Math.cos(0.2 * i);
        data.push(y);
    }

    // Create the heightfield shape
    var heightfieldShape = new Heightfield(data, {
        elementSize: 1 // Distance between the data points in X and Y directions
    });
    var heightfieldBody = new Body();
    heightfieldBody.addShape(heightfieldShape);
    world.addBody(heightfieldBody);