Normand Briere
2019-08-12 b1d79b74514041a059b454a9f6fc3970773c0cb8
Cone.java
....@@ -2,7 +2,7 @@
22
33 class Cone extends Biparam implements java.io.Serializable
44 {
5
- //static final long serialVersionUID = -679715043452968126L;
5
+ static final long serialVersionUID = -2558098774090336324L; // -679715043452968126L;
66
77 Cone()
88 {
....@@ -193,6 +193,11 @@
193193 return inside;
194194 }
195195
196
+ double uStretch()
197
+ {
198
+ return 6; // Actually 6.28 (I think)
199
+ }
200
+
196201 Vertex biparamFunction(double u, double v)
197202 {
198203 cVector tPos;
....@@ -263,9 +268,11 @@
263268 editWindow = objectUI.GetEditor();
264269 }
265270
266
- void drawEditHandles(ClickInfo info, int level)
271
+ void drawEditHandles(//ClickInfo info,
272
+ int level)
267273 {
268
- super.drawEditHandles(info, level);
274
+ super.drawEditHandles(//info,
275
+ level);
269276 if (level == 1)
270277 {
271278 return;
....@@ -273,37 +280,39 @@
273280 {
274281 cVector temp = new cVector();
275282 LA.xformPos(base, toParent, temp);
276
- Rectangle baseSpot = calcHotSpot(temp, info);
283
+ Rectangle baseSpot = calcHotSpot(temp); //, info);
277284 LA.xformPos(apex, toParent, temp);
278
- Rectangle apexSpot = calcHotSpot(temp, info);
279
- info.g.setColor(Color.green);
280
- info.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
281
- info.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
285
+ Rectangle apexSpot = calcHotSpot(temp); //, info);
286
+ clickInfo.g.setColor(Color.green);
287
+ clickInfo.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height);
288
+ clickInfo.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height);
282289 return;
283290 }
284291 }
285292
286
- boolean doEditClick(ClickInfo info, int level)
293
+ boolean doEditClick(//ClickInfo info,
294
+ int level)
287295 {
288296 //if (level == 0)
289297 //return false;
290298 hitSomething = 0;
291
- if (super.doEditClick(info, level))
299
+ if (super.doEditClick(//info,
300
+ level))
292301 {
293302 hitSomething = 1;
294303 return true;
295304 }
296305 cVector temp = new cVector();
297306 LA.xformPos(base, toParent, temp);
298
- Rectangle baseSpot = calcHotSpot(temp, info);
307
+ Rectangle baseSpot = calcHotSpot(temp); //, info);
299308 LA.xformPos(apex, toParent, temp);
300
- Rectangle apexSpot = calcHotSpot(temp, info);
301
- if (baseSpot.contains(info.x, info.y))
309
+ Rectangle apexSpot = calcHotSpot(temp); //, info);
310
+ if (baseSpot.contains(clickInfo.x, clickInfo.y))
302311 {
303312 hitSomething = 2;
304313 startRad = baseRadius;
305314 } else
306
- if (apexSpot.contains(info.x, info.y))
315
+ if (apexSpot.contains(clickInfo.x, clickInfo.y))
307316 {
308317 hitSomething = 3;
309318 startRad = apexRadius;
....@@ -311,20 +320,22 @@
311320 {
312321 return false;
313322 }
314
- startX = info.x;
323
+ startX = clickInfo.x;
315324 return true;
316325 }
317326
318
- void doEditDrag(ClickInfo info, boolean opposite)
327
+ void doEditDrag(//ClickInfo info,
328
+ boolean opposite)
319329 {
320330 if (hitSomething == 0)
321331 return;
322332 if (hitSomething == 1)
323333 {
324
- super.doEditDrag(info, opposite);
334
+ super.doEditDrag(//info,
335
+ opposite);
325336 return;
326337 }
327
- double deltaR = info.x - startX;
338
+ double deltaR = clickInfo.x - startX;
328339 double newRad = startRad + deltaR;
329340 if (newRad < 0)
330341 newRad = 0;
....@@ -333,7 +344,7 @@
333344 else
334345 apexRadius = newRad;
335346 recalculate();
336
- info.pane.repaint();
347
+ clickInfo.pane.repaint();
337348 }
338349
339350 cVector base;