Revision 25868
trunk/libraries/libAnimation2D/src/main/java/com/iver/cit/gvsig/animation/animatedObject/AnimationObject2D.java | ||
---|---|---|
17 | 17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
18 | 18 |
*/ |
19 | 19 |
|
20 |
/** |
|
21 |
* @author ?ngel Fraile Gri??n e-mail: angel.fraile@iver.es |
|
22 |
* @since 1.1 |
|
23 |
* |
|
24 |
*/ |
|
20 | 25 |
|
21 | 26 |
package com.iver.cit.gvsig.animation.animatedObject; |
22 | 27 |
|
trunk/libraries/libAnimation2D/src/main/java/com/iver/cit/gvsig/animation/animationType/AnimationTypeFactoryLayer2D.java | ||
---|---|---|
17 | 17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
18 | 18 |
*/ |
19 | 19 |
|
20 |
|
|
21 |
|
|
22 |
/** |
|
23 |
* @author ?ngel Fraile Gri??n e-mail: angel.fraile@iver.es |
|
24 |
* @since 1.1 |
|
25 |
* |
|
26 |
*/ |
|
20 | 27 |
package com.iver.cit.gvsig.animation.animationType; |
21 | 28 |
|
22 | 29 |
import com.iver.cit.gvsig.animation.AnimationFactory; |
trunk/libraries/libAnimation2D/src/main/java/com/iver/cit/gvsig/animation/animationType/AnimationLayer2D.java | ||
---|---|---|
35 | 35 |
import com.iver.utiles.IPersistence; |
36 | 36 |
import com.iver.utiles.XMLEntity; |
37 | 37 |
|
38 |
|
|
39 |
/** |
|
40 |
* @author ?ngel Fraile Gri??n e-mail: angel.fraile@iver.es |
|
41 |
* @since 1.1 |
|
42 |
* |
|
43 |
*/ |
|
38 | 44 |
public class AnimationLayer2D implements IAnimationTypeKeyFrame { |
39 | 45 |
|
40 | 46 |
private String className = "AnimationLayer2D"; |
... | ... | |
74 | 80 |
this.name = name; |
75 | 81 |
} |
76 | 82 |
|
83 |
|
|
84 |
/** |
|
85 |
* Repainting the view |
|
86 |
*/ |
|
87 |
|
|
77 | 88 |
public void AppliesToObject(Object animated) { |
78 | 89 |
|
79 | 90 |
// Casting the animated object |
... | ... | |
101 | 112 |
this.interpolator = interpolator; |
102 | 113 |
} |
103 | 114 |
|
104 |
|
|
115 |
/** |
|
116 |
* Getting the animated object, in movement track animation; the view |
|
117 |
*/ |
|
105 | 118 |
public Object getAnimatedObject() { |
106 | 119 |
if(this.animationObject2D != null) { |
107 | 120 |
// getting all views. |
trunk/libraries/libAnimation2D/src/main/java/com/iver/cit/gvsig/animation/interpolator/Interpolator2D.java | ||
---|---|---|
29 | 29 |
import com.iver.cit.gvsig.project.ProjectExtent; |
30 | 30 |
import com.iver.utiles.XMLEntity; |
31 | 31 |
|
32 |
/** |
|
33 |
* @author ?ngel Fraile Gri??n e-mail: angel.fraile@iver.es |
|
34 |
* @since 1.1 |
|
35 |
* |
|
36 |
*/ |
|
37 |
|
|
32 | 38 |
public class Interpolator2D implements IInterpolator { |
33 | 39 |
|
34 | 40 |
private String description = "Interpolaci?n basada en encuadres"; |
... | ... | |
36 | 42 |
|
37 | 43 |
private IInterpolatorTimeFuntion funtion; |
38 | 44 |
|
45 |
/** |
|
46 |
* Calculating the new positions in the movement animation |
|
47 |
*/ |
|
39 | 48 |
public IKeyFrame interpolate(List<IKeyFrame> kfList, int index, double time) { |
40 | 49 |
KeyFrame2D KF = new KeyFrame2D(); |
41 | 50 |
|
... | ... | |
86 | 95 |
return KF; |
87 | 96 |
} |
88 | 97 |
|
98 |
/** |
|
99 |
* Return a value interpolate |
|
100 |
* |
|
101 |
* @param minX: initial x value in the 2D extent |
|
102 |
* @param minX2: final x value in the 2D extent |
|
103 |
* @param timePos: initial time value |
|
104 |
* @param timePos2: final time value |
|
105 |
* @param time: total time |
|
106 |
* @return |
|
107 |
*/ |
|
89 | 108 |
private double linearInterpolate(double minX, double minX2, double timePos, |
90 | 109 |
double timePos2, double time) { |
91 | 110 |
// P1 + (P2-P1)*((t-t1)/(t2-t1)) |
trunk/libraries/libAnimation2D/src/main/java/com/iver/cit/gvsig/animation/keyFrame/KeyFrame2D.java | ||
---|---|---|
26 | 26 |
import com.iver.cit.gvsig.project.ProjectExtent; |
27 | 27 |
import com.iver.utiles.XMLEntity; |
28 | 28 |
|
29 |
/** |
|
30 |
* @author ?ngel Fraile Gri??n e-mail: angel.fraile@iver.es |
|
31 |
* @since 1.1 |
|
32 |
* |
|
33 |
*/ |
|
29 | 34 |
public class KeyFrame2D implements IKeyFrame { |
30 | 35 |
|
31 | 36 |
private String name; |
trunk/libraries/libAnimation2D/src/main/java/com/iver/cit/gvsig/animation/keyFrame/AnimationKeyFrame2DFactory.java | ||
---|---|---|
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
2 |
* |
|
3 |
* Copyright (C) 2005 IVER T.I. and Generalitat Valenciana. |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or |
|
6 |
* modify it under the terms of the GNU General Public License |
|
7 |
* as published by the Free Software Foundation; either version 2 |
|
8 |
* of the License, or (at your option) any later version. |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
18 |
*/ |
|
19 |
|
|
1 | 20 |
package com.iver.cit.gvsig.animation.keyFrame; |
2 | 21 |
|
3 | 22 |
import com.iver.cit.gvsig.animation.AnimationFactory; |
... | ... | |
3 | 22 |
|
4 | 23 |
|
24 |
/** |
|
25 |
* @author ?ngel Fraile Gri??n e-mail: angel.fraile@iver.es |
|
26 |
* @since 1.1 |
|
27 |
* |
|
28 |
*/ |
|
5 | 29 |
public class AnimationKeyFrame2DFactory extends AnimationFactory { |
6 | 30 |
|
Also available in: Unified diff