Object[] allocateArray(Object data[], int num) {
      Object newData[] = null;
      if (data instanceof javax.vecmath.Point3f[]) {
	  newData = new Point3f[num];
      } else if (data instanceof javax.vecmath.Vector3f[]) {
	  newData = new Vector3f[num];
      } else if (data instanceof javax.vecmath.Color3f[]) {
	  newData = new Color3f[num];
      } else if (data instanceof javax.vecmath.Color4f[]) {
	  newData = new Color4f[num];
      } else if (data instanceof javax.vecmath.TexCoord2f[]) {
	  newData = new TexCoord2f[num];
      } else if (data instanceof javax.vecmath.TexCoord3f[]) {
	  newData = new TexCoord3f[num];
      } else if (data instanceof javax.vecmath.TexCoord4f[]) {
	  newData = new TexCoord4f[num];
      } else if (data instanceof IndexRow[]) {
	  // Hack so we can use compactData for coordIndexOnly
	  newData = new IndexRow[num];
      } else throw new IllegalArgumentException(
	  J3dUtilsI18N.getString("GeometryInfo9"));
      return newData;
  } // End of allocateArray