aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/classes/share/javax/media/j3d/ExponentialFogRetained.java3
-rw-r--r--src/classes/share/javax/media/j3d/FogRetained.java34
-rw-r--r--src/classes/share/javax/media/j3d/LinearFogRetained.java4
3 files changed, 18 insertions, 23 deletions
diff --git a/src/classes/share/javax/media/j3d/ExponentialFogRetained.java b/src/classes/share/javax/media/j3d/ExponentialFogRetained.java
index 38e0a04..0379c32 100644
--- a/src/classes/share/javax/media/j3d/ExponentialFogRetained.java
+++ b/src/classes/share/javax/media/j3d/ExponentialFogRetained.java
@@ -81,7 +81,6 @@ class ExponentialFogRetained extends FogRetained {
void setLive(SetLiveState s) {
super.setLive(s);
- GroupRetained group;
// Initialize the mirror object, this needs to be done, when
// renderBin is not accessing any of the fields
@@ -95,7 +94,7 @@ class ExponentialFogRetained extends FogRetained {
createMessage.args[1]= new Integer(INIT_MIRROR);
ArrayList addScopeList = new ArrayList();
for (int i = 0; i < scopes.size(); i++) {
- group = (GroupRetained)scopes.get(i);
+ GroupRetained group = scopes.get(i);
tempKey.reset();
group.addAllNodesForScopedFog(mirrorFog, addScopeList, tempKey);
}
diff --git a/src/classes/share/javax/media/j3d/FogRetained.java b/src/classes/share/javax/media/j3d/FogRetained.java
index f9626bb..c633544 100644
--- a/src/classes/share/javax/media/j3d/FogRetained.java
+++ b/src/classes/share/javax/media/j3d/FogRetained.java
@@ -61,10 +61,10 @@ abstract class FogRetained extends LeafRetained{
*/
BoundingLeafRetained boundingLeaf = null;
- /**
- * Vector of GroupRetained nodes that scopes this fog.
- */
- Vector scopes = new Vector();
+/**
+ * Vector of GroupRetained nodes that scopes this fog.
+ */
+Vector<GroupRetained> scopes = new Vector<GroupRetained>();
// An int that is set when this fog is changed
int isDirty = 0xffff;
@@ -243,11 +243,10 @@ abstract class FogRetained extends LeafRetained{
ArrayList addScopeList = new ArrayList();
ArrayList removeScopeList = new ArrayList();
- GroupRetained group;
Object[] scopeInfo = new Object[3];
- group = (GroupRetained) scopes.get(index);
+ GroupRetained group = scopes.get(index);
tempKey.reset();
group.removeAllNodesForScopedFog(mirrorFog, removeScopeList, tempKey);
@@ -299,7 +298,7 @@ abstract class FogRetained extends LeafRetained{
void initRemoveScope(int index) {
- GroupRetained group = (GroupRetained)scopes.elementAt(index);
+ GroupRetained group = scopes.elementAt(index);
scopes.removeElementAt(index);
group.removeFogScope();
@@ -309,7 +308,7 @@ abstract class FogRetained extends LeafRetained{
Object[] scopeInfo = new Object[3];
ArrayList removeScopeList = new ArrayList();
- GroupRetained group = (GroupRetained)scopes.elementAt(index);
+ GroupRetained group = scopes.elementAt(index);
tempKey.reset();
group.removeAllNodesForScopedFog(mirrorFog, removeScopeList, tempKey);
@@ -328,7 +327,7 @@ abstract class FogRetained extends LeafRetained{
* @return the scoperen at location index
*/
Group getScope(int index) {
- return (Group)(((GroupRetained)(scopes.elementAt(index))).source);
+ return (Group)(scopes.elementAt(index).source);
}
/**
@@ -336,10 +335,10 @@ abstract class FogRetained extends LeafRetained{
* @return an enumeration object of the scoperen
*/
Enumeration getAllScopes() {
- Enumeration elm = scopes.elements();
- Vector v = new Vector(scopes.size());
+ Enumeration<GroupRetained> elm = scopes.elements();
+ Vector<Group> v = new Vector<Group>(scopes.size());
while (elm.hasMoreElements()) {
- v.add( ((GroupRetained) elm.nextElement()).source);
+ v.add((Group)elm.nextElement().source);
}
return v.elements();
}
@@ -351,7 +350,7 @@ abstract class FogRetained extends LeafRetained{
*/
void initAddScope(Group scope) {
GroupRetained group = (GroupRetained)scope.retained;
- scopes.addElement((GroupRetained)(scope.retained));
+ scopes.addElement(group);
group.setFogScope();
}
@@ -389,7 +388,7 @@ abstract class FogRetained extends LeafRetained{
*/
int indexOfScope(Group scope) {
if(scope != null)
- return scopes.indexOf((GroupRetained)scope.retained);
+ return scopes.indexOf(scope.retained);
else
return scopes.indexOf(null);
}
@@ -419,12 +418,11 @@ abstract class FogRetained extends LeafRetained{
void removeAllScopes() {
Object[] scopeInfo = new Object[3];
ArrayList removeScopeList = new ArrayList();
- GroupRetained group;
int n = scopes.size();
tempKey.reset();
- for(int index = n-1; index >= 0; index--) {
- group = (GroupRetained)scopes.elementAt(index);
+ for (int index = n - 1; index >= 0; index--) {
+ GroupRetained group = scopes.elementAt(index);
group.removeAllNodesForScopedFog(mirrorFog, removeScopeList, tempKey);
initRemoveScope(index);
}
@@ -755,7 +753,7 @@ abstract class FogRetained extends LeafRetained{
fr.initInfluencingBounds(b);
}
- fr.scopes = new Vector();
+ fr.scopes = new Vector<GroupRetained>();
fr.isDirty = 0xffff;
fr.inImmCtx = false;
fr.region = null;
diff --git a/src/classes/share/javax/media/j3d/LinearFogRetained.java b/src/classes/share/javax/media/j3d/LinearFogRetained.java
index 1caf235..39a09d7 100644
--- a/src/classes/share/javax/media/j3d/LinearFogRetained.java
+++ b/src/classes/share/javax/media/j3d/LinearFogRetained.java
@@ -121,8 +121,6 @@ class LinearFogRetained extends FogRetained {
void setLive(SetLiveState s) {
- GroupRetained group;
-
super.setLive(s);
// Initialize the mirror object, this needs to be done, when
@@ -137,7 +135,7 @@ class LinearFogRetained extends FogRetained {
createMessage.args[1]= new Integer(INIT_MIRROR);
ArrayList addScopeList = new ArrayList();
for (int i = 0; i < scopes.size(); i++) {
- group = (GroupRetained)scopes.get(i);
+ GroupRetained group = scopes.get(i);
tempKey.reset();
group.addAllNodesForScopedFog(mirrorFog, addScopeList, tempKey);
}