Revision 15421 import/ext3D/branches/ext3D_v1.1/libAnimation/src/com/iver/cit/gvsig/animation/interval/AnimationKeyFrameInterval.java
AnimationKeyFrameInterval.java | ||
---|---|---|
8 | 8 |
import com.iver.cit.gvsig.animation.keyframe.IAnimationTypeKeyFrame; |
9 | 9 |
import com.iver.cit.gvsig.animation.keyframe.IInterpolator; |
10 | 10 |
import com.iver.cit.gvsig.animation.keyframe.IKeyFrame; |
11 |
import com.iver.cit.gvsig.animation.test.Interpolator2D; |
|
12 |
import com.iver.cit.gvsig.animation.test.KeyFrame2D; |
|
13 | 11 |
import com.iver.cit.gvsig.project.ProjectExtent; |
14 | 12 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
15 | 13 |
import com.iver.utiles.XMLEntity; |
... | ... | |
89 | 87 |
for (Iterator iter = KFL.iterator(); iter.hasNext();) { |
90 | 88 |
IKeyFrame element = (IKeyFrame) iter.next(); |
91 | 89 |
double KFtime = element.getTime(); |
90 |
boolean asigned = false; |
|
92 | 91 |
if (KFtime <= tini) { |
93 | 92 |
if (previus != null) { |
94 | 93 |
if (KFtime > previus.getTime()) |
... | ... | |
96 | 95 |
} else { |
97 | 96 |
previus = element; |
98 | 97 |
} |
99 |
|
|
100 |
|
|
98 |
asigned = true; |
|
101 | 99 |
} |
102 |
if (KFtime > tini) {
|
|
100 |
if ((KFtime > tini) && (!asigned)) {
|
|
103 | 101 |
if (next != null) { |
104 | 102 |
if (KFtime < previus.getTime()) |
105 | 103 |
next = element; |
... | ... | |
109 | 107 |
|
110 | 108 |
} |
111 | 109 |
|
112 |
|
|
113 | 110 |
} |
114 | 111 |
KFLInterpolate.add(previus); |
115 | 112 |
KFLInterpolate.add(next); |
... | ... | |
117 | 114 |
|
118 | 115 |
IKeyFrame frame = null; |
119 | 116 |
if (KFLInterpolate != null) { |
120 |
// IInterpolator in = (IInterpolator) interpolator;
|
|
117 |
// IInterpolator in = (IInterpolator) interpolator;
|
|
121 | 118 |
frame = interpolator.interpolate(KFLInterpolate, 0, tini); |
122 | 119 |
} |
120 |
if (frame != null) |
|
121 |
animationType.AppliesToObject(frame); |
|
123 | 122 |
|
124 |
animationType.AppliesToObject(frame); |
|
125 |
|
|
126 |
|
|
127 |
|
|
128 | 123 |
} |
129 | 124 |
|
130 | 125 |
public XMLEntity getXMLEntity() { |
Also available in: Unified diff