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
|
/* */ package NET.worlds.scape;
/* */
/* */ import java.io.IOException;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class BoxBumpCalc
/* */ extends BumpCalc
/* */ {
/* */ public void detectBump(BumpEventTemp b, WObject owner)
/* */ {
/* 53 */ BoundBoxTemp box = owner.getBoundBox();
/* 54 */ BoundBoxTemp sourceBox = ((WObject)b.source).getBoundBox();
/* */
/* 56 */ box.lo.minus(sourceBox.hi.minus(b.sourceAt));
/* 57 */ box.hi.minus(sourceBox.lo.minus(b.sourceAt));
/* */
/* 59 */ Point3Temp pos = Point3Temp.make();
/* 60 */ pos.x = box.lo.x;
/* 61 */ pos.y = box.lo.y;
/* 62 */ float xExtent = box.hi.x - box.lo.x;
/* 63 */ float yExtent = box.hi.y - box.lo.y;
/* */
/* 65 */ Point3Temp d = Point3Temp.make(xExtent, 0.0F, 0.0F);
/* 66 */ Point3Temp extent = Point3Temp.make(0.0F, yExtent / 2.0F, 0.0F);
/* */
/* */
/* */
/* */
/* 71 */ if (b.hitTriRegion(owner, pos, d, extent)) {
/* 72 */ return;
/* */ }
/* 74 */ pos.x = box.hi.x;
/* 75 */ pos.y = box.hi.y;
/* 76 */ d.x = (-d.x);
/* 77 */ extent.y = (-extent.y);
/* */
/* 79 */ if (b.hitTriRegion(owner, pos, d, extent)) {
/* 80 */ return;
/* */ }
/* 82 */ pos.y = box.lo.y;
/* 83 */ d.y = yExtent;
/* 84 */ d.x = 0.0F;
/* 85 */ extent.x = (-xExtent / 2.0F);
/* 86 */ extent.y = 0.0F;
/* */
/* 88 */ if (b.hitTriRegion(owner, pos, d, extent)) {
/* 89 */ return;
/* */ }
/* 91 */ pos.x = box.lo.x;
/* 92 */ pos.y = box.hi.y;
/* 93 */ d.y = (-d.y);
/* 94 */ extent.x = (-extent.x);
/* */
/* 96 */ if (b.hitTriRegion(owner, pos, d, extent)) {}
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* 104 */ private static Object classCookie = new Object();
/* */
/* */ public void saveState(Saver s) throws IOException
/* */ {
/* 108 */ s.saveVersion(0, classCookie);
/* 109 */ super.saveState(s);
/* */ }
/* */
/* */ public void restoreState(Restorer r) throws IOException, TooNewException
/* */ {
/* 114 */ switch (r.restoreVersion(classCookie)) {
/* */ case 0:
/* 116 */ super.restoreState(r);
/* 117 */ break;
/* */ default:
/* 119 */ throw new TooNewException();
/* */ }
/* */ }
/* */ }
/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\BoxBumpCalc.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|