diff options
author | Harvey Harrison <[email protected]> | 2012-10-10 00:29:53 -0700 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-10-10 00:40:54 -0700 |
commit | f24a01217f39df3b02a01444ac1a720994f090c8 (patch) | |
tree | 3f1ed24ddcd14aa547c9276b9e32d97e5e300766 /src/classes/share | |
parent | 9a040a3b9c72a307e3f19078483ede534f289bd0 (diff) |
j3dcore: fix fatal bug in Shape3DCompileRetained intersect()
This code must not be being triggered as the type annotation uncovered it mixing
up Geometry and GeometryRetained, this likely looks like the Geometry should have
been getting its .retained member used instead, do that here, it can't be any worse
than what was there before.
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes/share')
-rw-r--r-- | src/classes/share/javax/media/j3d/Shape3DCompileRetained.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java b/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java index c77fd77..7b5f863 100644 --- a/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java +++ b/src/classes/share/javax/media/j3d/Shape3DCompileRetained.java @@ -65,7 +65,6 @@ Shape3DCompileRetained(Shape3DRetained[] shapes, int nShapes, int compileFlags) // Remove the null that was added by Shape3DRetained constructor geometryList.remove(0); - int geoIndex = 0; // Assign the fields for this compile shape boundsAutoCompute = shapes[0].boundsAutoCompute; @@ -316,8 +315,8 @@ Bounds getBounds(int childIndex) { } - boolean intersect(PickInfo pickInfo, PickShape pickShape, int flags, - ArrayList geometryList) { +boolean intersect(PickInfo pickInfo, PickShape pickShape, int flags, + ArrayList<Geometry> geometryList) { Transform3D localToVworld = pickInfo.getLocalToVWorldRef(); @@ -327,14 +326,13 @@ Bounds getBounds(int childIndex) { int geomListSize = geometryList.size(); GeometryRetained geometry; - if (((flags & PickInfo.CLOSEST_INTERSECTION_POINT) == 0) && ((flags & PickInfo.CLOSEST_DISTANCE) == 0) && ((flags & PickInfo.CLOSEST_GEOM_INFO) == 0) && ((flags & PickInfo.ALL_GEOM_INFO) == 0)) { for (int i=0; i < geomListSize; i++) { - geometry = (GeometryRetained) geometryList.get(i); + geometry = (GeometryRetained) geometryList.get(i).retained; if (geometry != null) { if (geometry.mirrorGeometry != null) { geometry = geometry.mirrorGeometry; @@ -355,7 +353,7 @@ Bounds getBounds(int childIndex) { Point3d iPntVW = new Point3d(); for (int i=0; i < geomListSize; i++) { - geometry = (GeometryRetained) geometryList.get(i); + geometry = (GeometryRetained) geometryList.get(i).retained; if (geometry != null) { if (geometry.mirrorGeometry != null) { geometry = geometry.mirrorGeometry; |