/** * Retrieves the vertexFormat of this GeometryArray * @return format of vertices in this GeometryArray * @exception CapabilityNotSetException if the appropriate capability is * not set and this object is part of a live or compiled scene graph */ public int getVertexFormat() { if (isLiveOrCompiled()) if(!this.getCapability(ALLOW_FORMAT_READ)) throw new CapabilityNotSetException(J3dI18N.getString("GeometryArray2")); return ((GeometryArrayRetained)this.retained).getVertexFormat(); }
/** * The functions below are only used in compile mode */ void setCompiled(ArrayList curList) { int i; int num = curList.size(); int offset = 0; geoOffset = new int[num]; compileVcount = new int[num]; int vcount = 0, vformat = 0; vcount = 0; isCompiled = true; if (num > 0) source = ((SceneGraphObjectRetained)curList.get(0)).source; for (i = 0; i < num; i++) { // Build the back mapping GeometryArrayRetained geo = (GeometryArrayRetained)curList.get(i); ((GeometryArray)geo.source).retained = this; compileVcount[i] = geo.getValidVertexCount(); vcount += geo.getValidVertexCount(); geoOffset[i] = offset; offset += geo.stride() * compileVcount[i]; vformat = geo.getVertexFormat(); } createGeometryArrayData(vcount, vformat); // Assign the initial and valid fields validVertexCount = vcount; initialVertexIndex = 0; mergeGeometryArrays(curList); }
assert glyph_gar.getVertexFormat() == (GeometryArray.COORDINATES | GeometryArray.NORMALS) : "Font3D: Illegal GeometryArray format -- only coordinates and normals expected"; TriangleArray ga = new TriangleArray(glyph_gar.getVertexCount(),glyph_gar.getVertexFormat());
int format = src.getVertexFormat(); if ((format & BY_REFERENCE) == 0) { System.arraycopy(src.vertexData, 0, dst.vertexData, 0,
int k; GeometryArrayRetained geo = geometryArrays[0]; vFormat = ((geo.getVertexFormat() | (GeometryArray.BY_REFERENCE)) & ~(GeometryArray.INTERLEAVED)) ; texCoordSetCount = geo.getTexCoordSetCount(); texCoordSetMapLen = geo.getTexCoordSetMapLength();