aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2012-01-07 18:50:45 -0800
committerHarvey Harrison <[email protected]>2012-01-07 18:51:27 -0800
commit92599a1f34aa38f4869f1ab2033994aef1c5e775 (patch)
tree3439be468410f9d12b11496e1e4f72064e738992
parent4ebb5396511eb220f3bce31a05bdd94d6d607f69 (diff)
j3dcore: type annotations in EnvironmentSet
Remove some unused variables as well. Signed-off-by: Harvey Harrison <[email protected]>
-rw-r--r--src/classes/share/javax/media/j3d/EnvironmentSet.java39
-rw-r--r--src/classes/share/javax/media/j3d/LightBin.java6
-rw-r--r--src/classes/share/javax/media/j3d/RenderBin.java4
3 files changed, 22 insertions, 27 deletions
diff --git a/src/classes/share/javax/media/j3d/EnvironmentSet.java b/src/classes/share/javax/media/j3d/EnvironmentSet.java
index 18c6975..0951659 100644
--- a/src/classes/share/javax/media/j3d/EnvironmentSet.java
+++ b/src/classes/share/javax/media/j3d/EnvironmentSet.java
@@ -50,10 +50,10 @@ class EnvironmentSet extends Object implements ObjectUpdate{
static final int FOG_CHANGED = 0x04;
static final int MODELCLIP_CHANGED = 0x08;
- /**
- * The ArrayList of Lights in this EnvironmentSet
- */
- ArrayList lights = new ArrayList();
+/**
+ * The ArrayList of Lights in this EnvironmentSet
+ */
+ArrayList<LightRetained> lights = new ArrayList<LightRetained>();
/**
* The position of the light in the lightbin that the
@@ -62,10 +62,10 @@ class EnvironmentSet extends Object implements ObjectUpdate{
int[] ltPos = null;
- /**
- * The arraylist of ambient lights in this env list
- */
- ArrayList ambLights = new ArrayList();
+/**
+ * The arraylist of ambient lights in this env list
+ */
+ArrayList<LightRetained> ambLights = new ArrayList<LightRetained>();
/**
* The LightBin that this EnvironmentSet resides
@@ -112,11 +112,10 @@ class EnvironmentSet extends Object implements ObjectUpdate{
EnvironmentSet next = null;
EnvironmentSet prev = null;
- /**
- * List of attrributeBins to be added next Frame
- */
- ArrayList addAttributeBins = new ArrayList();
-
+/**
+ * List of attrributeBins to be added next Frame
+ */
+ArrayList<AttributeBin> addAttributeBins = new ArrayList<AttributeBin>();
/**
* Canvas Dirty Mask for
@@ -306,7 +305,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
AttributeBin a;
if (addAttributeBins.size() > 0) {
- a = (AttributeBin)addAttributeBins.get(0);
+ a = addAttributeBins.get(0);
if (attributeBinList == null) {
attributeBinList = a;
@@ -317,7 +316,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
attributeBinList = a;
}
for (i = 1; i < addAttributeBins.size() ; i++) {
- a = (AttributeBin) addAttributeBins.get(i);
+ a = addAttributeBins.get(i);
a.next = attributeBinList;
attributeBinList.prev = a;
attributeBinList = a;
@@ -366,7 +365,6 @@ class EnvironmentSet extends Object implements ObjectUpdate{
* Removes the given AttributeBin from this EnvironmentSet.
*/
void removeAttributeBin(AttributeBin a) {
- LightRetained light;
int i;
a.environmentSet = null;
@@ -401,11 +399,11 @@ class EnvironmentSet extends Object implements ObjectUpdate{
// that use this
int sz = lights.size();
for (i=0; i < sz; i++) {
- ((LightRetained) lights.get(i)).environmentSets.remove(this);
+ lights.get(i).environmentSets.remove(this);
}
sz = ambLights.size();
for (i = 0; i < sz; i++) {
- ((LightRetained) ambLights.get(i)).environmentSets.remove(this);
+ ambLights.get(i).environmentSets.remove(this);
}
if (fog != null) {
fog.environmentSets.remove(this);
@@ -421,7 +419,7 @@ class EnvironmentSet extends Object implements ObjectUpdate{
sceneAmbient.y = 0.0f;
sceneAmbient.z = 0.0f;
for (i=0; i<ambLights.size(); i++) {
- LightRetained aL = (LightRetained) ambLights.get(i);
+ LightRetained aL = ambLights.get(i);
if (aL.lightOn) {
sceneAmbient.x += aL.color.x;
sceneAmbient.y += aL.color.y;
@@ -457,9 +455,6 @@ class EnvironmentSet extends Object implements ObjectUpdate{
void updateAttributes(Canvas3D cv) {
- LightRetained light;
- int i, numLights;
- float red, green, blue;
double scale;
boolean updateSceneAmbient = false, updateLightEnables = false;
boolean updateModelClip = false, updateFog = false;
diff --git a/src/classes/share/javax/media/j3d/LightBin.java b/src/classes/share/javax/media/j3d/LightBin.java
index 2342bad..ff79c57 100644
--- a/src/classes/share/javax/media/j3d/LightBin.java
+++ b/src/classes/share/javax/media/j3d/LightBin.java
@@ -161,7 +161,7 @@ class LightBin extends Object implements ObjectUpdate {
numEsLights = e.lights.size();
slotsNeeded = numEsLights;
for (i=0; i<numEsLights; i++) {
- light = (LightRetained) e.lights.get(i);
+ light = e.lights.get(i);
if (light instanceof AmbientLightRetained) {
continue;
}
@@ -188,7 +188,7 @@ class LightBin extends Object implements ObjectUpdate {
numEsLights = e.lights.size();
for (i=0; i<numEsLights; i++) {
- light = (LightRetained) e.lights.get(i);
+ light = e.lights.get(i);
if (light instanceof AmbientLightRetained) {
continue;
}
@@ -311,7 +311,7 @@ class LightBin extends Object implements ObjectUpdate {
else {
numEsLights = e.lights.size();
for (i=0; i<numEsLights; i++) {
- light = (LightRetained) e.lights.get(i);
+ light = e.lights.get(i);
for (j=0; j<maxLights; j++) {
if (lights[j] == light) {
lightsRef[j]--;
diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java
index 5690a12..2478674 100644
--- a/src/classes/share/javax/media/j3d/RenderBin.java
+++ b/src/classes/share/javax/media/j3d/RenderBin.java
@@ -4671,7 +4671,7 @@ System.err.println("......tb.soleUser= " +
}
// Check the "to-be-added" list of attributeBins for a match
for (i = 0; i < envSet.addAttributeBins.size(); i++) {
- currentBin = (AttributeBin)envSet.addAttributeBins.get(i);
+ currentBin = envSet.addAttributeBins.get(i);
if (currentBin.equals(renderingAttributes, ra)) {
return(currentBin);
}
@@ -5623,7 +5623,7 @@ System.err.println("......tb.soleUser= " +
lmask = 0;
ltsize = e.lights.size();
for (j = 0; j < ltsize; j++) {
- LightRetained curLt = (LightRetained)e.lights.get(j);
+ LightRetained curLt = e.lights.get(j);
if (lt == curLt) {
lmask = (1 << e.ltPos[j]);
if (curLt.lightOn == true) {