*/
    public GeometryArray createGeometry (int type) {	GeometryArray tetra = null;	if (type == 1) {	    tetra =new TriangleArray(12, 				     TriangleArray.COORDINATES|				     TriangleArray.COLOR_3|				     TriangleArray.BY_REFERENCE|				     TriangleArray.USE_NIO_BUFFER);	    	    tetra.setCoordRefBuffer(floatBufferCoord);	    tetra.setColorRefBuffer(floatBufferColor);	}	else if (type == 2) {	    tetra = new TriangleStripArray(12,					   TriangleStripArray.COORDINATES|					   TriangleStripArray.COLOR_3|					   TriangleStripArray.BY_REFERENCE|					   TriangleStripArray.USE_NIO_BUFFER,					   stripVertexCounts);	    tetra.setCoordRefBuffer(floatBufferCoord);	    tetra.setColorRefBuffer(floatBufferColor);	    	}	else if (type == 3) { // Indexed Geometry	    tetra = new IndexedTriangleArray(4,					     IndexedTriangleArray.COORDINATES|					     IndexedTriangleArray.COLOR_3|					     IndexedTriangleArray.BY_REFERENCE|					     IndexedTriangleArray.USE_NIO_BUFFER,					     //IndexedTriangleStripArray.USE_COORD_INDEX_ONLY,					     12);	    tetra.setCoordRefBuffer(indexedFloatBufferCoord);	    tetra.setColorRefBuffer(indexedFloatBufferColor);	    ((IndexedTriangleArray)tetra).setCoordinateIndices(0, indices);	    ((IndexedTriangleArray)tetra).setColorIndices(0, indices);	}	else if (type == 4) { // Indexed strip geometry	    tetra = new IndexedTriangleStripArray(4,						  IndexedTriangleStripArray.COORDINATES|						  IndexedTriangleStripArray.COLOR_3|						  IndexedTriangleStripArray.BY_REFERENCE|						  IndexedTriangleStripArray.USE_NIO_BUFFER|						  IndexedTriangleStripArray.USE_COORD_INDEX_ONLY,						  12,						  stripVertexCounts);	    tetra.setCoordRefBuffer(indexedFloatBufferCoord);	    tetra.setColorRefBuffer(indexedFloatBufferColor);	    ((IndexedTriangleStripArray)tetra).setCoordinateIndices(0, indices);	    ((IndexedTriangleStripArray)tetra).setColorIndices(0, indices);	}	if (tetra != null)	    tetra.setCapability(GeometryArray.ALLOW_REF_DATA_WRITE);	return tetra;    }