]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d/src/org/simantics/proconf/g3d/animation/ScaledResourceAnimationController.java
Removing ancient 3d framework
[simantics/3d.git] / org.simantics.g3d / src / org / simantics / proconf / g3d / animation / ScaledResourceAnimationController.java
diff --git a/org.simantics.g3d/src/org/simantics/proconf/g3d/animation/ScaledResourceAnimationController.java b/org.simantics.g3d/src/org/simantics/proconf/g3d/animation/ScaledResourceAnimationController.java
deleted file mode 100644 (file)
index e3767a3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************\r
- * Copyright (c) 2007- VTT Technical Research Centre of Finland.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.proconf.g3d.animation;\r
-\r
-import org.simantics.db.Graph;\r
-import org.simantics.db.Resource;\r
-\r
-public class ScaledResourceAnimationController extends ResourceAnimationController {\r
-       double min;\r
-       double max;\r
-       double irange;\r
-       \r
-       public ScaledResourceAnimationController(Resource source, double min, double max) {\r
-               super(source);\r
-               this.max = max;\r
-               this.min = min;\r
-               this.irange = 1.0/(max - min);\r
-       }\r
-\r
-       \r
-       @Override\r
-       public void updateAnimation(Graph graph, double frameTime) {\r
-               double d = (getValue(graph) - min) * irange;\r
-        if (d > 1.0) {\r
-            d = 1.0;\r
-        } else if (d < 0.0) {\r
-            d = 0.0;\r
-        }\r
-        for (Animatable a : animatables)\r
-            a.animate(d,frameTime);\r
-       }\r
-}\r