constructor( mesh ) {

			let geometry = mesh.geometry;

			if ( ! geometry.isBufferGeometry || geometry.attributes.position.itemSize !== 3 ) {

				throw new Error( 'THREE.MeshSurfaceSampler: Requires BufferGeometry triangle mesh.' );

			}

			if ( geometry.index ) {

				console.warn( 'THREE.MeshSurfaceSampler: Converting geometry to non-indexed BufferGeometry.' );
				geometry = geometry.toNonIndexed();

			}

			this.geometry = geometry;
			this.randomFunction = Math.random;
			this.positionAttribute = this.geometry.getAttribute( 'position' );
			this.colorAttribute = this.geometry.getAttribute( 'color' );
			this.weightAttribute = null;
			this.distribution = null;

		}
Utility class for sampling weighted random points on the surface of a mesh.

Building the sampler is a one-time O(n) operation. Once built, any number of
random samples may be selected in O(logn) time. Memory usage is O(n).

References:
- http://www.joesfer.com/?p=84
- https://stackoverflow.com/a/4322940/1314762