diff options
author | Kenneth Russel <[email protected]> | 2007-04-10 00:23:45 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-04-10 00:23:45 +0000 |
commit | 5da3c985902fb90edd32ce2af2e82518ff8cefbe (patch) | |
tree | 70248546e070b1ad63fa72827a2c698e9628f61c /src/net/java/joglutils/msg/nodes/Group.java | |
parent | 3e839104e21ff5010f3b4751db9408f5c3386c5d (diff) |
Fixed bug in computation of orthographic projection matrix where it
was not taking into account the Z offset of the near/far planes. Fixed
bug in Camera's unprojection routine where it needed to specify the
negation of the near distance for the initial Z coordinate. Added
getWidth() and getHeight() to Texture2 node. Added convenience method
getPickedPoint() to RayPickAction. Added check to Camera to avoid
recomputing the projection matrix if the aspect ratio was set to the
same value as the last time. Made Group node Iterable.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@65 83d24430-9974-4f80-8418-2cc3294053b9
Diffstat (limited to 'src/net/java/joglutils/msg/nodes/Group.java')
-rw-r--r-- | src/net/java/joglutils/msg/nodes/Group.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net/java/joglutils/msg/nodes/Group.java b/src/net/java/joglutils/msg/nodes/Group.java index ccf06f0..05486ab 100644 --- a/src/net/java/joglutils/msg/nodes/Group.java +++ b/src/net/java/joglutils/msg/nodes/Group.java @@ -43,7 +43,7 @@ import net.java.joglutils.msg.actions.*; /** A node which manages other Node instances. */ -public class Group extends Node { +public class Group extends Node implements Iterable<Node> { private List<Node> children = new ArrayList<Node>(); /** Append a child node to the list of children nodes this group node is managing. */ @@ -124,6 +124,11 @@ public class Group extends Node { replaceChild(idx, newChild); } + /** Returns an Iterator over the nodes this Group contains. */ + public Iterator<Node> iterator() { + return children.iterator(); + } + public void doAction(Action action) { for (int i = 0; i < getNumChildren(); i++) { action.apply(getChild(i)); |