/* 144 */ debugOutputLn(2, "surf = " + surf);
/* */
/* 147 */ LwoTexture texture = surf.getTexture();
/* */
/* 149 */ Appearance appearance = new Appearance();
/* */ GeometryArray object;
/* 150 */ if (shape.facetSizes[0] == 1)
/* */ {
/* 153 */ GeometryArray object = new PointArray(vertexCount, vertexFormat);
/* */
/* 155 */ object.setCoordinates(0, shape.coordsArray);
/* 156 */ ColoringAttributes colorAtt = new ColoringAttributes(surf.getColor(), 0);
/* */
/* 159 */ PointAttributes pointStyle = new PointAttributes();
/* 160 */ pointStyle.setPointSize(1.0F);
/* */
/* 162 */ appearance.setColoringAttributes(colorAtt);
/* 163 */ appearance.setPointAttributes(pointStyle);
/* */ }
/* 165 */ else if (shape.facetSizes[0] == 2)
/* */ {
/* 168 */ debugOutputLn(8, "Creating IndexedLineArray");
/* 169 */ GeometryArray object = new LineArray(vertexCount, vertexFormat);
/* */
/* 171 */ object.setCoordinates(0, shape.coordsArray);
/* 172 */ ColoringAttributes colorAtt = new ColoringAttributes(surf.getColor(), 0);
/* */
/* 175 */ appearance.setColoringAttributes(colorAtt);
/* */ }
/* */ else
/* */ {
/* 179 */ debugOutputLn(8, "Creating IndexedTriFanArray");
/* */
/* 181 */ vertexFormat |= 2;
/* */
/* 183 */ debugOutputLn(8, "about to process vertices/indices, facetIndices = " + shape.facetIndices);
/* */
/* 185 */ if (shape.facetIndices != null) {
/* 186 */ float[] textureCoords = null;
/* 187 */ int[] textureIndices = null;
/* */
/* 189 */ debugOutputLn(8, "setting vertexCount, normind = " + shape.normalIndices);
/* */
/* 191 */ debugOutputLn(8, "vtxcount, format, indcount = " + vertexCount + ", " + vertexFormat + ", " + indexCount);
/* */
/* 194 */ if (texture != null)
/* */ {
/* 197 */ vertexFormat |= 32;
/* 198 */ textureCoords = new float[vertexCount * 2];
/* 199 */ textureIndices = new int[shape.facetIndices.length];
/* 200 */ calculateTextureCoords(texture, shape.coordsArray, shape.facetIndices, textureCoords, textureIndices);
/* */
/* 203 */ debugOutputLn(8, "textureCoords:");
/* 204 */ debugOutputLn(8, "texture Coords, Indices.length = " + textureCoords.length + ", " + textureIndices.length);
/* */ }
/* 206 */ debugOutputLn(8, "about to create GeometryInfo");
/* */
/* 209 */ GeometryInfo gi = new GeometryInfo(3);
/* */
/* 211 */ gi.setCoordinates(shape.coordsArray);
/* 212 */ gi.setCoordinateIndices(shape.facetIndices);
/* 213 */ gi.setStripCounts(shape.facetSizes);
/* 214 */ if (texture != null) {
/* 215 */ gi.setTextureCoordinateParams(1, 2);
/* 216 */ gi.setTextureCoordinates(0, textureCoords);
/* 217 */ gi.setTextureCoordinateIndices(0, textureIndices);
/* */ }
/* 219 */ gi.recomputeIndices();
/* 220 */ NormalGenerator ng = new NormalGenerator(surf.getCreaseAngle());
/* */
/* 222 */ ng.generateNormals(gi);
/* 223 */ Stripifier st = new Stripifier();
/* 224 */ st.stripify(gi);
/* 225 */ GeometryArray object = gi.getGeometryArray(true, true, false);
/* 226 */ debugOutputLn(8, "done.");
/* */ }
/* */ else
/* */ {
/* 232 */ debugOutputLn(8, "about to create trifanarray with vertexCount, facetSizes.len = " + vertexCount + ", " + shape.facetSizes.length);
/* */
/* 237 */ object = new TriangleFanArray(vertexCount, vertexFormat, shape.facetSizes);
/* */
/* 241 */ object.setCoordinates(0, shape.coordsArray);
/* 242 */ object.setNormals(0, shape.normalCoords);
/* 243 */ debugOutputLn(2, "passed in normalCoords, length = " + shape.normalCoords.length);
/* */ }
/* */
/* 246 */ debugOutputLn(8, "created fan array");
/* */