diff options
author | Chien Yang <[email protected]> | 2007-10-08 23:39:56 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2007-10-08 23:39:56 +0000 |
commit | a408ebecbfbbb8622a252390758afbcf1acba665 (patch) | |
tree | c5636c559dfa891c5f1faa3dd5914cf17280431d /src/classes | |
parent | 481d4b43d9473a3b4e42dd351e148b7de20ad2e4 (diff) |
Fixed Issue 519 : IntersectionInfo.getGeometry return null for IndexedArrayGeometry. This fix is submitted by jeromerobert.
Removed unuse import and local variables.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@869 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java | 4 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java | 50 |
2 files changed, 28 insertions, 26 deletions
diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java index b8fdc02..3e0d74d 100644 --- a/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java +++ b/src/classes/share/javax/media/j3d/IndexedGeometryArrayRetained.java @@ -91,7 +91,6 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained { GeometryArrayRetained cloneNonIndexedGeometry() { GeometryArrayRetained obj = null; - int vOffset; switch (this.geoType) { case GEO_TYPE_INDEXED_LINE_SET: @@ -116,7 +115,8 @@ abstract class IndexedGeometryArrayRetained extends GeometryArrayRetained { vertexAttrCount, vertexAttrSizes); obj.cloneSourceArray = this; obj.unIndexify(this); - + obj.source=source; + return obj; } diff --git a/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java b/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java index 656b0f5..98293cc 100644 --- a/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java +++ b/src/classes/share/javax/media/j3d/IndexedGeometryStripArrayRetained.java @@ -11,7 +11,6 @@ */ package javax.media.j3d; -import java.util.Vector; import java.util.ArrayList; /** @@ -138,29 +137,32 @@ abstract class IndexedGeometryStripArrayRetained extends IndexedGeometryArrayRet } - GeometryArrayRetained cloneNonIndexedGeometry() { - GeometryStripArrayRetained obj = null; - int i; - switch (this.geoType) { - case GEO_TYPE_INDEXED_LINE_STRIP_SET: - obj = new LineStripArrayRetained(); - break; - case GEO_TYPE_INDEXED_TRI_FAN_SET: - obj = new TriangleFanArrayRetained(); - break; - case GEO_TYPE_INDEXED_TRI_STRIP_SET: - obj = new TriangleStripArrayRetained(); - break; - } - obj.createGeometryArrayData(validIndexCount, - (vertexFormat & ~(GeometryArray.BY_REFERENCE|GeometryArray.INTERLEAVED|GeometryArray.USE_NIO_BUFFER)), - texCoordSetCount, texCoordSetMap, - vertexAttrCount, vertexAttrSizes); - obj.unIndexify(this); - obj.setStripVertexCounts(stripIndexCounts); - - return obj; - } + @Override + GeometryArrayRetained cloneNonIndexedGeometry() { + GeometryStripArrayRetained obj = null; + + switch (this.geoType) { + case GEO_TYPE_INDEXED_LINE_STRIP_SET: + obj = new LineStripArrayRetained(); + break; + case GEO_TYPE_INDEXED_TRI_FAN_SET: + obj = new TriangleFanArrayRetained(); + break; + case GEO_TYPE_INDEXED_TRI_STRIP_SET: + obj = new TriangleStripArrayRetained(); + break; + } + obj.createGeometryArrayData(validIndexCount, + (vertexFormat & ~(GeometryArray.BY_REFERENCE|GeometryArray.INTERLEAVED|GeometryArray.USE_NIO_BUFFER)), + texCoordSetCount, texCoordSetMap, + vertexAttrCount, vertexAttrSizes); + obj.unIndexify(this); + obj.setStripVertexCounts(stripIndexCounts); + obj.cloneSourceArray = this; + obj.source = source; + + return obj; + } /** |