summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-07-01 07:42:17 -0700
committerHarvey Harrison <[email protected]>2013-07-01 07:42:17 -0700
commitce40992933a66f58f749ce18eeb76f65ae8babf1 (patch)
tree96900241141ed77c8cb8c0c84243acfe740f0641
parenteb249ad45a4794f2ff21269a3a6c8594b50d0b97 (diff)
j3dcore: annotate the scoped nodes list in SetLiveState
Signed-off-by: Harvey Harrison <[email protected]>
-rw-r--r--src/classes/share/javax/media/j3d/GroupRetained.java4
-rw-r--r--src/classes/share/javax/media/j3d/RenderBin.java8
-rw-r--r--src/classes/share/javax/media/j3d/SetLiveState.java16
-rw-r--r--src/classes/share/javax/media/j3d/SoundScheduler.java16
-rw-r--r--src/classes/share/javax/media/j3d/SoundStructure.java16
-rw-r--r--src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java4
6 files changed, 28 insertions, 36 deletions
diff --git a/src/classes/share/javax/media/j3d/GroupRetained.java b/src/classes/share/javax/media/j3d/GroupRetained.java
index 5b444c6..edde74f 100644
--- a/src/classes/share/javax/media/j3d/GroupRetained.java
+++ b/src/classes/share/javax/media/j3d/GroupRetained.java
@@ -1555,7 +1555,7 @@ synchronized void setAltAppScope() {
s.changedViewGroup = new ArrayList();
s.changedViewList = new ArrayList();
s.keyList = new int[10];
- s.viewScopedNodeList = new ArrayList();
+ s.viewScopedNodeList = new ArrayList<NodeRetained>();
s.scopedNodesViewList = new ArrayList<ArrayList<View>>();
}
@@ -1717,7 +1717,7 @@ synchronized void setAltAppScope() {
s.changedViewGroup = new ArrayList();
s.changedViewList = new ArrayList();
s.keyList = new int[10];
- s.viewScopedNodeList = new ArrayList();
+ s.viewScopedNodeList = new ArrayList<NodeRetained>();
s.scopedNodesViewList = new ArrayList<ArrayList<View>>();
}
diff --git a/src/classes/share/javax/media/j3d/RenderBin.java b/src/classes/share/javax/media/j3d/RenderBin.java
index 31f357f..29cb7bf 100644
--- a/src/classes/share/javax/media/j3d/RenderBin.java
+++ b/src/classes/share/javax/media/j3d/RenderBin.java
@@ -6674,7 +6674,7 @@ void addGeometryDlist(RenderAtomListInfo ra) {
}
void insertNodes(J3dMessage m) {
- ArrayList viewScopedNodes = (ArrayList) m.args[3];
+ ArrayList<NodeRetained> viewScopedNodes = (ArrayList<NodeRetained>)m.args[3];
ArrayList<ArrayList<View>> scopedNodesViewList = (ArrayList<ArrayList<View>>)m.args[4];
int i;
Object[] nodes = (Object[])m.args[0];
@@ -6716,7 +6716,7 @@ void insertNodes(J3dMessage m) {
if (viewScopedNodes != null) {
int size = viewScopedNodes.size();
for (i = 0; i < size; i++) {
- NodeRetained n = (NodeRetained)viewScopedNodes.get(i);
+ NodeRetained n = viewScopedNodes.get(i);
ArrayList<View> vl = scopedNodesViewList.get(i);
// If the node object is scoped to this view, then ..
if (vl.contains(view)) {
@@ -6755,7 +6755,7 @@ void insertNodes(J3dMessage m) {
}
void removeNodes(J3dMessage m) {
- ArrayList viewScopedNodes = (ArrayList) m.args[3];
+ ArrayList<NodeRetained> viewScopedNodes = (ArrayList<NodeRetained>)m.args[3];
ArrayList<ArrayList<View>> scopedNodesViewList = (ArrayList<ArrayList<View>>)m.args[4];
int i;
Object[] nodes = (Object[])m.args[0];
@@ -6805,7 +6805,7 @@ void removeNodes(J3dMessage m) {
if (viewScopedNodes != null) {
int size = viewScopedNodes.size();
for (i = 0; i < size; i++) {
- NodeRetained node = (NodeRetained)viewScopedNodes.get(i);
+ NodeRetained node = viewScopedNodes.get(i);
ArrayList<View> vl = scopedNodesViewList.get(i);
// If the node object is scoped to this view, then ..
if (vl.contains(view)) {
diff --git a/src/classes/share/javax/media/j3d/SetLiveState.java b/src/classes/share/javax/media/j3d/SetLiveState.java
index ab78cf9..f7f5d1f 100644
--- a/src/classes/share/javax/media/j3d/SetLiveState.java
+++ b/src/classes/share/javax/media/j3d/SetLiveState.java
@@ -57,14 +57,14 @@ class SetLiveState extends Object {
*/
ArrayList nodeList = new ArrayList();
- /**
- * List of nodes that are viewScoped. Note that all nodes
- * except Shape3D nodes can be in viewScopedNodeList, shape3D
- * nodes will always be in the nodeList regardless of scoped
- * or not. Also, only renderbin and renderingEnv structure is
- * interested in viewScopedNodeList
- */
- ArrayList viewScopedNodeList = null;
+/**
+ * List of nodes that are viewScoped. Note that all nodes
+ * except Shape3D nodes can be in viewScopedNodeList, shape3D
+ * nodes will always be in the nodeList regardless of scoped
+ * or not. Also, only renderbin and renderingEnv structure is
+ * interested in viewScopedNodeList
+ */
+ArrayList<NodeRetained> viewScopedNodeList = null;
/**
* Parallel list to viewScopedNodeList containing a list of views
diff --git a/src/classes/share/javax/media/j3d/SoundScheduler.java b/src/classes/share/javax/media/j3d/SoundScheduler.java
index 892ad3b..386e61b 100644
--- a/src/classes/share/javax/media/j3d/SoundScheduler.java
+++ b/src/classes/share/javax/media/j3d/SoundScheduler.java
@@ -326,12 +326,11 @@ class SoundScheduler extends J3dStructure {
void insertNodes(J3dMessage m) {
Object[] nodes = (Object[])m.args[0];
- ArrayList viewScopedNodes = (ArrayList)m.args[3];
+ ArrayList<NodeRetained> viewScopedNodes = (ArrayList<NodeRetained>)m.args[3];
ArrayList<ArrayList<View>> scopedNodesViewList = (ArrayList<ArrayList<View>>)m.args[4];
- Object node;
for (int i=0; i<nodes.length; i++) {
- node = (Object) nodes[i];
+ Object node = nodes[i];
if (node instanceof SoundRetained) {
nRetainedSounds++;
// insert sound node into sound scheduler's prioritized list
@@ -358,9 +357,8 @@ class SoundScheduler extends J3dStructure {
// Handle ViewScoped Nodes
if (viewScopedNodes != null) {
int size = viewScopedNodes.size();
- int vlsize;
for (int i = 0; i < size; i++) {
- node = (NodeRetained)viewScopedNodes.get(i);
+ NodeRetained node = viewScopedNodes.get(i);
ArrayList<View> vl = scopedNodesViewList.get(i);
// If the node object is scoped to this view, then ..
if (vl.contains(view)) {
@@ -396,12 +394,11 @@ class SoundScheduler extends J3dStructure {
*/
void removeNodes(J3dMessage m) {
Object[] nodes = (Object[])m.args[0];
- ArrayList viewScopedNodes = (ArrayList)m.args[3];
+ ArrayList<NodeRetained> viewScopedNodes = (ArrayList<NodeRetained>)m.args[3];
ArrayList<ArrayList<View>> scopedNodesViewList = (ArrayList<ArrayList<View>>)m.args[4];
- Object node;
for (int i=0; i<nodes.length; i++) {
- node = (Object) nodes[i];
+ Object node = nodes[i];
if (node instanceof SoundRetained) {
// sound is deactivated but NOT deleted
// incase sound is reattached
@@ -435,9 +432,8 @@ class SoundScheduler extends J3dStructure {
// Handle ViewScoped Nodes
if (viewScopedNodes != null) {
int size = viewScopedNodes.size();
- int vlsize;
for (int i = 0; i < size; i++) {
- node = (NodeRetained)viewScopedNodes.get(i);
+ NodeRetained node = viewScopedNodes.get(i);
ArrayList<View> vl = scopedNodesViewList.get(i);
// If the node object is scoped to this view, then ..
if (vl.contains(view)) {
diff --git a/src/classes/share/javax/media/j3d/SoundStructure.java b/src/classes/share/javax/media/j3d/SoundStructure.java
index 8c65c43..77ac722 100644
--- a/src/classes/share/javax/media/j3d/SoundStructure.java
+++ b/src/classes/share/javax/media/j3d/SoundStructure.java
@@ -166,12 +166,11 @@ class SoundStructure extends J3dStructure {
void insertNodes(J3dMessage m) {
Object[] nodes = (Object[])m.args[0];
- ArrayList viewScopedNodes = (ArrayList)m.args[3];
+ ArrayList<NodeRetained> viewScopedNodes = (ArrayList<NodeRetained>)m.args[3];
ArrayList<ArrayList<View>> scopedNodesViewList = (ArrayList<ArrayList<View>>)m.args[4];
- Object node;
for (int i=0; i<nodes.length; i++) {
- node = (Object) nodes[i];
+ Object node = nodes[i];
if (node instanceof SoundRetained) {
addNonScopedSound((SoundRetained) node);
}
@@ -182,9 +181,8 @@ class SoundStructure extends J3dStructure {
// Handle ViewScoped Nodes
if (viewScopedNodes != null) {
int size = viewScopedNodes.size();
- int vlsize;
for (int i = 0; i < size; i++) {
- node = (NodeRetained)viewScopedNodes.get(i);
+ NodeRetained node = viewScopedNodes.get(i);
ArrayList<View> vl = scopedNodesViewList.get(i);
int vsize = vl.size();
if (node instanceof SoundRetained) {
@@ -255,12 +253,11 @@ class SoundStructure extends J3dStructure {
void removeNodes(J3dMessage m) {
Object[] nodes = (Object[])m.args[0];
- ArrayList viewScopedNodes = (ArrayList)m.args[3];
+ ArrayList<NodeRetained> viewScopedNodes = (ArrayList<NodeRetained>)m.args[3];
ArrayList<ArrayList<View>> scopedNodesViewList = (ArrayList<ArrayList<View>>)m.args[4];
- Object node;
for (int i=0; i<nodes.length; i++) {
- node = (Object) nodes[i];
+ Object node = nodes[i];
if (node instanceof SoundRetained) {
deleteNonScopedSound((SoundRetained) node);
}
@@ -271,9 +268,8 @@ class SoundStructure extends J3dStructure {
// Handle ViewScoped Nodes
if (viewScopedNodes != null) {
int size = viewScopedNodes.size();
- int vlsize;
for (int i = 0; i < size; i++) {
- node = (NodeRetained)viewScopedNodes.get(i);
+ NodeRetained node = viewScopedNodes.get(i);
ArrayList<View> vl = scopedNodesViewList.get(i);
// If the node object is scoped to this view, then ..
int vsize = vl.size();
diff --git a/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java b/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java
index 515dee1..5b83b4c 100644
--- a/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java
+++ b/src/classes/share/javax/media/j3d/ViewSpecificGroupRetained.java
@@ -541,7 +541,7 @@ Enumeration<View> getAllViews() {
s.changedViewGroup = new ArrayList();
s.changedViewList = new ArrayList();
s.keyList = new int[10];
- s.viewScopedNodeList = new ArrayList();
+ s.viewScopedNodeList = new ArrayList<NodeRetained>();
s.scopedNodesViewList = new ArrayList<ArrayList<View>>();
}
super.setLive(s);
@@ -555,7 +555,7 @@ Enumeration<View> getAllViews() {
s.changedViewGroup = new ArrayList();
s.changedViewList = new ArrayList();
s.keyList = new int[10];
- s.viewScopedNodeList = new ArrayList();
+ s.viewScopedNodeList = new ArrayList<NodeRetained>();
s.scopedNodesViewList = new ArrayList<ArrayList<View>>();
}
// XXXX: This is a hack since removeNodeData is called before