From 44ded763ea870d0daad90a0f7355a5792b16b774 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 18 Mar 2007 23:30:00 +0000 Subject: Added extensible action method mechanism via ActionTable, decoupling Action implementations from the set of Nodes in the library. Refactored OpenGL rendering into node instances to potentially share more code among different Action subclasses. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@45 83d24430-9974-4f80-8418-2cc3294053b9 --- src/net/java/joglutils/msg/elements/TextureCoordinateElement.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/net/java/joglutils/msg/elements/TextureCoordinateElement.java') diff --git a/src/net/java/joglutils/msg/elements/TextureCoordinateElement.java b/src/net/java/joglutils/msg/elements/TextureCoordinateElement.java index 6d36c6c..8d24bfc 100644 --- a/src/net/java/joglutils/msg/elements/TextureCoordinateElement.java +++ b/src/net/java/joglutils/msg/elements/TextureCoordinateElement.java @@ -52,13 +52,21 @@ public class TextureCoordinateElement extends Element { public Element newInstance() { return new TextureCoordinateElement(); } + /** Returns the instance of this element in the passed State. */ public static TextureCoordinateElement getInstance(State state) { return (TextureCoordinateElement) state.getElement(index); } + /** Enables this element in the passed state, which should be the + default for a given action. */ public static void enable(State defaultState) { TextureCoordinateElement tmp = new TextureCoordinateElement(); defaultState.setElement(tmp.getStateIndex(), tmp); } + /** Indicates whether this element is enabled in the given default + state for a particular action. */ + public static boolean isEnabled(State state) { + return (state.getDefaults().getElement(index) != null); + } // The actual coordinate data protected FloatBuffer coords; -- cgit v1.2.3