这是java3d 1.5.2中的错误吗?

时间:2014-11-08 20:26:01

标签: java java-3d

我打电话

  final int n = points.length;
  final int m = opoints.length;
  final LineStripArray lsa = new LineStripArray(n + m, GeometryArray.COORDINATES, new int[] { n, m });
  final GeometryInfo gi = new GeometryInfo(lsa);

并在

中出错
 private static void create(GeometryInfo geomInfo,
                 GeometryStripArray geomArray)
  {
    if (geomArray instanceof TriangleFanArray) {
      geomInfo.reset(GeometryInfo.TRIANGLE_FAN_ARRAY);
    } else if (geomArray instanceof TriangleStripArray) {
      geomInfo.reset(GeometryInfo.TRIANGLE_STRIP_ARRAY);
    } else throw new IllegalArgumentException(
      J3dUtilsI18N.getString("GeometryInfoGenerator0")); // <--- Error here

    processGeometryArray(geomInfo, geomArray); 
    processStripArray(geomInfo, geomArray);
  } // End of create(GeometryInfo, GeometryStripArray)

这是可以理解的,因为

class GeometryInfoGenerator extends Object {

  public static void create(GeometryInfo geomInfo, GeometryArray geomArray)
  {
    if (geomArray instanceof GeometryStripArray) 
      create(geomInfo, (GeometryStripArray)geomArray);
    else if (geomArray instanceof TriangleArray) {
      geomInfo.reset(GeometryInfo.TRIANGLE_ARRAY);
      processGeometryArray(geomInfo, geomArray);
    } else if (geomArray instanceof QuadArray) {
      geomInfo.reset(GeometryInfo.QUAD_ARRAY);
      processGeometryArray(geomInfo, geomArray);
    } else if (geomArray instanceof IndexedGeometryArray)
      create(geomInfo, (IndexedGeometryArray)geomArray);
    else throw new IllegalArgumentException(
      J3dUtilsI18N.getString("GeometryInfoGenerator0"));
  } // End of create(GeometryInfo, GeometryArray)
使用类型为LineStripArray的参数调用

,该参数扩展了GeometryStripArray。

此刻我是否精神上迷茫,或者这种情况真的有用吗?

0 个答案:

没有答案