if ((vFormat & GeometryArray.NORMALS) != 0) { morphedGeo.setNormalIndices(0, igeo.indexNormal); } if ((vFormat & GeometryArray.COLOR) != 0) { morphedGeo.setColorIndices(0, igeo.indexColor); } if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) { for (k = 0; k < texCoordSetCount; k++) { morphedGeo.setTextureCoordinateIndices(k, 0, (int[]) igeo.indexTexCoord[k]); } }
if ((vFormat & GeometryArray.USE_COORD_INDEX_ONLY) == 0) { if ((vFormat & GeometryArray.NORMALS) != 0) { morphedGeo.setNormalIndices(0, igeo.indexNormal); } if ((vFormat & GeometryArray.COLOR) != 0) { morphedGeo.setColorIndices(0, igeo.indexColor); } if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) { for (k = 0; k < texCoordSetCount; k++) { morphedGeo.setTextureCoordinateIndices(k, 0, (int[]) igeo.indexTexCoord[k]); } } }
    void initMorphedGeometry() {      int  vFormat, geoType, stripVCount[];       int iCount = 0;      int numStrips = 0;      int texCoordSetCount = 0;      int texCoordSetMapLen = 0;      int [] texCoordSetMap = null;      int k;      GeometryArrayRetained geo = geometryArrays[0];      vFormat = ((geo.getVertexFormat() | (GeometryArray.BY_REFERENCE)) & ~(GeometryArray.INTERLEAVED)) ;      texCoordSetCount = geo.getTexCoordSetCount();      texCoordSetMapLen = geo.getTexCoordSetMapLength();      if (texCoordSetMapLen > 0) {          texCoordSetMap = new int[texCoordSetMapLen];	   geo.getTexCoordSetMap(texCoordSetMap);      }      geoType = geo.geoType;            switch (geoType){	case GeometryRetained.GEO_TYPE_QUAD_SET:	    this.morphedGeometryArray = 	     	new QuadArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount, 				texCoordSetMap);	    break;	case GeometryRetained.GEO_TYPE_TRI_SET: 	    this.morphedGeometryArray = 		new TriangleArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount,				texCoordSetMap);	    break;	case GeometryRetained.GEO_TYPE_POINT_SET:	    this.morphedGeometryArray = 		new PointArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount,				texCoordSetMap);	    break;	case GeometryRetained.GEO_TYPE_LINE_SET:	    this.morphedGeometryArray = 		new LineArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount,				texCoordSetMap);	    break;	case GeometryRetained.GEO_TYPE_TRI_STRIP_SET:	    numStrips = ((TriangleStripArrayRetained)geo).getNumStrips();	    stripVCount = new int[numStrips];	    ((TriangleStripArrayRetained)geo).getStripVertexCounts(stripVCount);	    this.morphedGeometryArray = 		new TriangleStripArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount,			texCoordSetMap, stripVCount);	    break;	case GeometryRetained.GEO_TYPE_TRI_FAN_SET:	    numStrips = ((TriangleFanArrayRetained)geo).getNumStrips();	    stripVCount = new int[numStrips];	    ((TriangleFanArrayRetained)geo).getStripVertexCounts(stripVCount);	    this.morphedGeometryArray = 		new TriangleFanArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount,			texCoordSetMap, stripVCount);		break;	case GeometryRetained.GEO_TYPE_LINE_STRIP_SET:	    numStrips = ((LineStripArrayRetained)geo).getNumStrips();	    stripVCount = new int[numStrips];	    ((LineStripArrayRetained)geo).getStripVertexCounts(stripVCount);	    this.morphedGeometryArray = 		new LineStripArray(geometryArrays[0].validVertexCount, vFormat, texCoordSetCount,			texCoordSetMap, stripVCount);		break;	case GeometryRetained.GEO_TYPE_INDEXED_QUAD_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    this.morphedGeometryArray = 		new IndexedQuadArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount);		break;	case GeometryRetained.GEO_TYPE_INDEXED_TRI_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    this.morphedGeometryArray = 		new IndexedTriangleArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount);		break;	case GeometryRetained.GEO_TYPE_INDEXED_POINT_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    this.morphedGeometryArray = 		new IndexedPointArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount);		break;	case GeometryRetained.GEO_TYPE_INDEXED_LINE_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    this.morphedGeometryArray = 		new IndexedLineArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount);	    break;	case GeometryRetained.GEO_TYPE_INDEXED_TRI_STRIP_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    numStrips = ((IndexedTriangleStripArrayRetained)geo).getNumStrips();	    stripVCount = new int[numStrips];	    ((IndexedTriangleStripArrayRetained)geo).getStripIndexCounts(stripVCount);	    this.morphedGeometryArray = 		new IndexedTriangleStripArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount, stripVCount);break;	case GeometryRetained.GEO_TYPE_INDEXED_TRI_FAN_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    numStrips = ((IndexedTriangleFanArrayRetained)geo).getNumStrips();	    stripVCount = new int[numStrips];	    ((IndexedTriangleFanArrayRetained)geo).getStripIndexCounts(stripVCount);	    this.morphedGeometryArray = 		new IndexedTriangleFanArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount, stripVCount);break;	case GeometryRetained.GEO_TYPE_INDEXED_LINE_STRIP_SET:	    iCount = ((IndexedGeometryArrayRetained)geo).getIndexCount();	    numStrips = ((IndexedLineStripArrayRetained)geo).getNumStrips();	    stripVCount = new int[numStrips];	    ((IndexedLineStripArrayRetained)geo).getStripIndexCounts(stripVCount);	    this.morphedGeometryArray = 		new IndexedLineStripArray(geometryArrays[0].getNumCoordCount(), vFormat, texCoordSetCount,			texCoordSetMap, iCount, stripVCount);break;	}	if (geometryArrays[0] instanceof IndexedGeometryArrayRetained) {	    IndexedGeometryArrayRetained igeo = (IndexedGeometryArrayRetained)		geometryArrays[0];	    IndexedGeometryArray morphedGeo = (IndexedGeometryArray)		morphedGeometryArray;	    if ((vFormat & GeometryArray.COORDINATES) != 0) {		morphedGeo.setCoordinateIndices(0, igeo.indexCoord);	    }	    if ((vFormat & GeometryArray.NORMALS) != 0) {		morphedGeo.setNormalIndices(0, igeo.indexNormal);	    }	    if ((vFormat & GeometryArray.COLOR) != 0) {		morphedGeo.setColorIndices(0, igeo.indexColor);	    }			    if ((vFormat & GeometryArray.TEXTURE_COORDINATE) != 0) {		for (k = 0; k < texCoordSetCount; k++) {		     morphedGeo.setTextureCoordinateIndices(k, 0, 					(int[]) igeo.indexTexCoord[k]);		}	    }	}	this.morphedGeometryArray.setCapability(GeometryArray.ALLOW_REF_DATA_WRITE);	GeometryArrayRetained mga = (GeometryArrayRetained)morphedGeometryArray.retained;	mga.updateData(this);	    }