diff options
author | Harvey Harrison <[email protected]> | 2013-02-02 10:21:40 -0800 |
---|---|---|
committer | Harvey Harrison <[email protected]> | 2013-02-02 10:21:40 -0800 |
commit | 05209b03729a3407976c4b8976274da0273a6da7 (patch) | |
tree | baced549bd8c65c3a12976a733dea11fbcb21126 /src/classes | |
parent | c9227e826c6c0ec4fa7c743b2de69893a8a273da (diff) |
j3dcore: Annotate list of user lights in GraphicsContext3D
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/classes')
-rw-r--r-- | src/classes/share/javax/media/j3d/GraphicsContext3D.java | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/src/classes/share/javax/media/j3d/GraphicsContext3D.java b/src/classes/share/javax/media/j3d/GraphicsContext3D.java index 4ee622f..8b2c8ec 100644 --- a/src/classes/share/javax/media/j3d/GraphicsContext3D.java +++ b/src/classes/share/javax/media/j3d/GraphicsContext3D.java @@ -124,7 +124,7 @@ public class GraphicsContext3D extends Object { private Background uBackground = null; private Fog uFog = null; private Appearance uAppearance = null; - private Vector uLights = new Vector(); + private Vector<Light> uLights = new Vector<Light>(); private HiResCoord uHiRes = new HiResCoord(); private Vector uSounds = new Vector(); private AuralAttributes uAuralAttributes = null; @@ -860,7 +860,7 @@ public class GraphicsContext3D extends Object { if (light.isLive()) { throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D14")); } - uLights.setElementAt(light, index); + uLights.set(index, light); if ((canvas3d.view == null) || (canvas3d.view.universe == null) || (!canvas3d.view.active) || @@ -904,7 +904,7 @@ public class GraphicsContext3D extends Object { if (light.isLive()) { throw new IllegalSharingException(J3dI18N.getString("GraphicsContext3D14")); } - uLights.insertElementAt(light, index); + uLights.add(index, light); if ((canvas3d.view == null) || (canvas3d.view.universe == null) || (!canvas3d.view.active) || @@ -932,7 +932,7 @@ public class GraphicsContext3D extends Object { * @param index which light to remove */ public void removeLight(int index) { - uLights.removeElementAt(index); + uLights.remove(index); if ((canvas3d.view == null) || (canvas3d.view.universe == null) || (!canvas3d.view.active) || @@ -956,22 +956,22 @@ public class GraphicsContext3D extends Object { this.lightsChanged = true; } - /** - * Retrieves the index selected light. - * @param index which light to return - * @return the light at location index - */ - public Light getLight(int index) { - return (Light) uLights.elementAt(index); - } +/** + * Retrieves the index selected light. + * @param index which light to return + * @return the light at location index + */ +public Light getLight(int index) { + return uLights.get(index); +} - /** - * Retrieves the enumeration object of all the lights. - * @return the enumeration object of all the lights - */ - public Enumeration getAllLights() { - return uLights.elements(); - } +/** + * Retrieves the enumeration object of all the lights. + * @return the enumeration object of all the lights + */ +public Enumeration<Light> getAllLights() { + return uLights.elements(); +} /** * Appends the specified light to this graphics context's list of lights. @@ -1014,14 +1014,13 @@ public class GraphicsContext3D extends Object { this.lightsChanged = true; } - /** - * Retrieves the current number of lights in this graphics context. - * @return the current number of lights - */ - public int numLights() { +/** + * Retrieves the current number of lights in this graphics context. + * @return the current number of lights + */ +public int numLights() { return this.uLights.size(); - } - +} private Transform3D getNormalTransform() { if (compTransform.isRigid()) { |