diff options
author | Harvey Harrison <[email protected]> | 2012-01-12 21:16:54 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2012-01-12 21:16:54 -0800 |
commit | e2cd2a8c0eed5ccc0f3c0f1e07ad0a7f08b733c3 (patch) | |
tree | 99e650e56755831a78e5c572ac4e75fd8d476308 /src | |
parent | 4c00dcf9ad239d1b4afbeb97aa1b150a22ca4fe1 (diff) |
j3dcore: add a constructor so that parts of RenderAtomListInfo can be final
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/share/javax/media/j3d/GeometryAtom.java | 4 | ||||
-rw-r--r-- | src/classes/share/javax/media/j3d/RenderAtomListInfo.java | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/classes/share/javax/media/j3d/GeometryAtom.java b/src/classes/share/javax/media/j3d/GeometryAtom.java index bd43c22..dee2158 100644 --- a/src/classes/share/javax/media/j3d/GeometryAtom.java +++ b/src/classes/share/javax/media/j3d/GeometryAtom.java @@ -183,9 +183,7 @@ RenderAtom getRenderAtom(View view) { boolean isGeoTypeText3D = (geoType == GeometryRetained.GEO_TYPE_TEXT3D); ra.rListInfo = new RenderAtomListInfo[geometryArray.length]; for (int j = 0; j < ra.rListInfo.length; j++) { - ra.rListInfo[j] = new RenderAtomListInfo(); - ra.rListInfo[j].renderAtom = ra; - ra.rListInfo[j].index = j; + ra.rListInfo[j] = new RenderAtomListInfo(ra, j); if (isGeoTypeText3D) ra.rListInfo[j].localToVworld = new Transform3D(); } diff --git a/src/classes/share/javax/media/j3d/RenderAtomListInfo.java b/src/classes/share/javax/media/j3d/RenderAtomListInfo.java index 3ff04f6..794b55c 100644 --- a/src/classes/share/javax/media/j3d/RenderAtomListInfo.java +++ b/src/classes/share/javax/media/j3d/RenderAtomListInfo.java @@ -35,13 +35,12 @@ package javax.media.j3d; * of these per RenderAtom, one per geometry in GeometryAtom */ class RenderAtomListInfo extends Object { - // RenderAtom that its a part of - RenderAtom renderAtom = null; +final RenderAtom renderAtom; // RenderAtom that its a part of - // Specific geometry index in the GeometryAtom geometryArr list that - // corresponds to this RenderAtomListInfo - int index; +// Specific geometry index in the GeometryAtom geometryArr list that +// corresponds to this RenderAtomListInfo +final int index; // Prev and next pointer RenderAtomListInfo next = null; @@ -55,6 +54,10 @@ class RenderAtomListInfo extends Object { Transform3D infLocalToVworld = null; Transform3D localToVworld = null; +RenderAtomListInfo(RenderAtom ra, int idx) { + renderAtom = ra; + index = idx; +} GeometryRetained geometry() { return renderAtom.geometryAtom.geometryArray[index]; |