1 /*******************************************************************************
\r
2 * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * which accompanies this distribution, and is available at
\r
6 * http://www.eclipse.org/legal/epl-v10.html
\r
9 * VTT Technical Research Centre of Finland - initial API and implementation
\r
10 *******************************************************************************/
\r
11 package org.simantics.proconf.g3d.animation;
\r
13 import java.util.ArrayList;
\r
14 import java.util.List;
\r
16 import org.simantics.db.Graph;
\r
18 public class TestAnimationController implements AnimationController {
\r
19 List<Animatable> animatables = new ArrayList<Animatable>();
\r
21 private double d = 0.0;
\r
22 private double delta = 0.01;
\r
24 public void addAnimatable(Animatable animatable) {
\r
25 animatables.add(animatable);
\r
29 public void setAnimatable(Animatable animatable) {
\r
30 animatables.clear();
\r
31 animatables.add(animatable);
\r
35 public void updateAnimation(Graph graph, double frameTime) {
\r
40 } else if (d < 0.0) {
\r
44 for (Animatable a : animatables)
\r
45 a.animate(d,frameTime);
\r
48 public void dispose() {
\r