1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
/* */ package NET.worlds.scape;
/* */
/* */ import java.io.IOException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class PostspinBehavior
/* */ extends SpinBehavior
/* */ implements FrameHandler
/* */ {
/* */ private float xCenter;
/* */ private float yCenter;
/* */ private float zCenter;
/* */
/* */ public PostspinBehavior(float x, float y, float z, float cycleTime)
/* */ {
/* 28 */ this(x, y, z, 0.0F, 0.0F, 1.0F, cycleTime);
/* */ }
/* */
/* */
/* */ public PostspinBehavior(float x, float y, float z, float ax, float ay, float az)
/* */ {
/* 34 */ this(x, y, z, ax, ay, az, 5.0F);
/* */ }
/* */
/* */
/* */ public PostspinBehavior(float x, float y, float z, float ax, float ay, float az, float cycleTime)
/* */ {
/* 40 */ super(cycleTime, ax, ay, az);
/* 41 */ this.xCenter = x;
/* 42 */ this.yCenter = y;
/* 43 */ this.zCenter = z;
/* */ }
/* */
/* */
/* */
/* */ public PostspinBehavior() {}
/* */
/* */
/* */
/* 52 */ public float getXCenter() { return this.xCenter; }
/* 53 */ public float getYCenter() { return this.yCenter; }
/* 54 */ public float getZCenter() { return this.zCenter; }
/* */
/* */
/* 57 */ public Point3Temp getCenter() { return Point3Temp.make(this.xCenter, this.yCenter, this.zCenter); }
/* */
/* 59 */ public void setXCenter(float c) { this.xCenter = c; }
/* 60 */ public void setYCenter(float c) { this.yCenter = c; }
/* 61 */ public void setZCenter(float c) { this.zCenter = c; }
/* */
/* */ public void setCenter(Point3Temp center) {
/* 64 */ this.xCenter = center.x;
/* 65 */ this.yCenter = center.y;
/* 66 */ this.zCenter = center.z;
/* */ }
/* */
/* */ public boolean handle(FrameEvent e)
/* */ {
/* 71 */ if ((this.enabled) && (this.cycleTime > 0.0F))
/* */ {
/* 73 */ e.receiver.moveBy(-this.xCenter, -this.yCenter, -this.zCenter);
/* 74 */ e.receiver.postspin(this.ax, this.ay, this.az, 0.36F * e.dt / this.cycleTime);
/* 75 */ e.receiver.moveBy(this.xCenter, this.yCenter, this.zCenter);
/* */ }
/* 77 */ return true;
/* */ }
/* */
/* */
/* */
/* */
/* */ public Object properties(int index, int offset, int mode, Object value)
/* */ throws NoSuchPropertyException
/* */ {
/* 86 */ Object ret = null;
/* 87 */ switch (index - offset) {
/* */ case 0:
/* 89 */ if (mode == 0) {
/* 90 */ ret = Point3PropertyEditor.make(
/* 91 */ new Property(this, index, "Center"));
/* 92 */ } else if (mode == 1) {
/* 93 */ ret = new Point3(getCenter());
/* 94 */ } else if (mode == 2)
/* 95 */ setCenter((Point3)value);
/* 96 */ break;
/* */ default:
/* 98 */ ret = super.properties(index, offset + 1, mode, value);
/* */ }
/* 100 */ return ret;
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 105 */ return
/* */
/* */
/* 108 */ super.toString() + "[center " + getCenter() + ", axis " + getAxis() + ", cycleTime " + this.cycleTime + ", enabled " + this.enabled + "]";
/* */ }
/* */
/* 111 */ private static Object classCookie = new Object();
/* */
/* */ public void saveState(Saver s) throws IOException
/* */ {
/* 115 */ s.saveVersion(0, classCookie);
/* 116 */ super.saveState(s);
/* 117 */ s.saveFloat(this.xCenter);
/* 118 */ s.saveFloat(this.yCenter);
/* 119 */ s.saveFloat(this.zCenter);
/* */ }
/* */
/* */ public void restoreState(Restorer r) throws IOException, TooNewException
/* */ {
/* 124 */ switch (r.restoreVersion(classCookie)) {
/* */ case 0:
/* 126 */ super.restoreState(r);
/* 127 */ this.xCenter = r.restoreFloat();
/* 128 */ this.yCenter = r.restoreFloat();
/* 129 */ this.zCenter = r.restoreFloat();
/* 130 */ break;
/* */ default:
/* 132 */ throw new TooNewException();
/* */ }
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\PostspinBehavior.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|