svn-gvsig-desktop / import / ext3D / branches / ext3D_v1.1 / extAnimation3D / src / com / iver / cit / gvsig / animation / AnimationLayer3DFlat.java @ 15439
History | View | Annotate | Download (2.35 KB)
1 |
package com.iver.cit.gvsig.animation; |
---|---|
2 |
|
3 |
import com.iver.ai2.gvsig3d.camera.ProjectCamera; |
4 |
import com.iver.ai2.gvsig3d.gui.Hud; |
5 |
import com.iver.ai2.gvsig3d.gui.View3D; |
6 |
import com.iver.cit.gvsig.animation.IAnimationType; |
7 |
import com.iver.cit.gvsig.animation.keyframe.IAnimationTypeKeyFrame; |
8 |
import com.iver.cit.gvsig.animation.keyframe.IInterpolator; |
9 |
import com.iver.cit.gvsig.animation.keyframe.IKeyFrame; |
10 |
|
11 |
import es.upv.ai2.libjosg.Node; |
12 |
import es.upv.ai2.libjosg.viewer.Camera; |
13 |
|
14 |
public class AnimationLayer3DFlat implements IAnimationTypeKeyFrame { |
15 |
|
16 |
private String className = this.getClass().getName(); |
17 |
private String description = "Animacion basada en encuadres para vista 3D plana"; |
18 |
private String name = "Animacion vista 3D plana"; |
19 |
private int typeTrack = IAnimationType.TIME_TYPE_TRACK; |
20 |
private IInterpolator interpolator;
|
21 |
private View3D view;
|
22 |
|
23 |
public AnimationLayer3DFlat() {
|
24 |
this.interpolator = new Interpolator3DFlat(); |
25 |
} |
26 |
|
27 |
public String getClassName() { |
28 |
return className;
|
29 |
} |
30 |
|
31 |
public String getDescription() { |
32 |
return description;
|
33 |
} |
34 |
|
35 |
public String getName() { |
36 |
return name;
|
37 |
} |
38 |
|
39 |
public void setClassName(String className) { |
40 |
this.className = className;
|
41 |
} |
42 |
|
43 |
public void setDescription(String description) { |
44 |
this.description = description;
|
45 |
} |
46 |
|
47 |
public void setName(String name) { |
48 |
this.name = name;
|
49 |
} |
50 |
|
51 |
public void AppliesToObject(Object animated) { |
52 |
|
53 |
// TODO implementar esta funcion para vistas 3D esfericas.
|
54 |
|
55 |
KeyFrame3DFlat keyf = (KeyFrame3DFlat) animated; |
56 |
ProjectCamera projectCamera = (ProjectCamera) keyf.getAnimatedObject(); |
57 |
|
58 |
view.setCamera(projectCamera.getCamera()); |
59 |
// Hud hud = (Hud) view.getCanvas3d().getOSGViewer().getNodeFromHUD(0);
|
60 |
// hud.setAnimationTime(AnimationPlayer.getCurrentTime()/1000);
|
61 |
// hud.updateHud();
|
62 |
|
63 |
|
64 |
view.getCanvas3d().repaint(); |
65 |
|
66 |
} |
67 |
|
68 |
public int getTypeTrack() { |
69 |
return typeTrack;
|
70 |
} |
71 |
|
72 |
public void setTypeTrack(int typeTrack) { |
73 |
this.typeTrack = typeTrack;
|
74 |
|
75 |
} |
76 |
|
77 |
public IInterpolator getInterpolator() {
|
78 |
return this.interpolator; |
79 |
} |
80 |
|
81 |
public void setInterpolator(IInterpolator interpolator) { |
82 |
this.interpolator = interpolator;
|
83 |
|
84 |
} |
85 |
|
86 |
public Object getAnimatedObject() { |
87 |
// TODO Auto-generated method stub
|
88 |
return this.view; |
89 |
} |
90 |
|
91 |
public void setAnimatedObject(Object object) { |
92 |
this.view = (View3D) object;
|
93 |
|
94 |
} |
95 |
|
96 |
} |