function generateShape( p ) {

			switch( p.shapeType ) {

				case 0:
					return new Ammo.btSphereShape( p.width );

				case 1:
					return new Ammo.btBoxShape( new Ammo.btVector3( p.width, p.height, p.depth ) );

				case 2:
					return new Ammo.btCapsuleShape( p.width, p.height );

				default:
					throw 'unknown shape type ' + p.shapeType;

			}

		}
This helper class responsibilies are

1. manage Ammo.js and Three.js object resources and
   improve the performance and the memory consumption by
   reusing objects.

2. provide simple Ammo object operations.