summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java')
-rw-r--r--src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java b/src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java
index dd70ca3..4635a83 100644
--- a/src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java
+++ b/src/net/java/joglutils/msg/elements/ProjectionMatrixElement.java
@@ -50,13 +50,21 @@ public class ProjectionMatrixElement extends Element {
public Element newInstance() {
return new ProjectionMatrixElement();
}
+ /** Returns the instance of this element in the passed State. */
public static ProjectionMatrixElement getInstance(State state) {
return (ProjectionMatrixElement) 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) {
Element tmp = new ProjectionMatrixElement();
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 matrix data
protected Mat4f matrix;