.. | .. |
---|
2 | 2 | |
---|
3 | 3 | class Cone extends Biparam implements java.io.Serializable |
---|
4 | 4 | { |
---|
| 5 | + static final long serialVersionUID = -2558098774090336324L; // -679715043452968126L; |
---|
5 | 6 | |
---|
6 | 7 | Cone() |
---|
7 | 8 | { |
---|
.. | .. |
---|
192 | 193 | return inside; |
---|
193 | 194 | } |
---|
194 | 195 | |
---|
| 196 | + double uStretch() |
---|
| 197 | + { |
---|
| 198 | + return 6; // Actually 6.28 (I think) |
---|
| 199 | + } |
---|
| 200 | + |
---|
195 | 201 | Vertex biparamFunction(double u, double v) |
---|
196 | 202 | { |
---|
197 | 203 | cVector tPos; |
---|
.. | .. |
---|
262 | 268 | editWindow = objectUI.GetEditor(); |
---|
263 | 269 | } |
---|
264 | 270 | |
---|
265 | | - void drawEditHandles(ClickInfo info, int level) |
---|
| 271 | + void drawEditHandles(//ClickInfo info, |
---|
| 272 | + int level) |
---|
266 | 273 | { |
---|
267 | | - super.drawEditHandles(info, level); |
---|
| 274 | + super.drawEditHandles(//info, |
---|
| 275 | + level); |
---|
268 | 276 | if (level == 1) |
---|
269 | 277 | { |
---|
270 | 278 | return; |
---|
.. | .. |
---|
272 | 280 | { |
---|
273 | 281 | cVector temp = new cVector(); |
---|
274 | 282 | LA.xformPos(base, toParent, temp); |
---|
275 | | - Rectangle baseSpot = calcHotSpot(temp, info); |
---|
| 283 | + Rectangle baseSpot = calcHotSpot(temp); //, info); |
---|
276 | 284 | LA.xformPos(apex, toParent, temp); |
---|
277 | | - Rectangle apexSpot = calcHotSpot(temp, info); |
---|
278 | | - info.g.setColor(Color.green); |
---|
279 | | - info.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height); |
---|
280 | | - 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); |
---|
281 | 289 | return; |
---|
282 | 290 | } |
---|
283 | 291 | } |
---|
284 | 292 | |
---|
285 | | - boolean doEditClick(ClickInfo info, int level) |
---|
| 293 | + boolean doEditClick(//ClickInfo info, |
---|
| 294 | + int level) |
---|
286 | 295 | { |
---|
287 | 296 | //if (level == 0) |
---|
288 | 297 | //return false; |
---|
289 | 298 | hitSomething = 0; |
---|
290 | | - if (super.doEditClick(info, level)) |
---|
| 299 | + if (super.doEditClick(//info, |
---|
| 300 | + level)) |
---|
291 | 301 | { |
---|
292 | 302 | hitSomething = 1; |
---|
293 | 303 | return true; |
---|
294 | 304 | } |
---|
295 | 305 | cVector temp = new cVector(); |
---|
296 | 306 | LA.xformPos(base, toParent, temp); |
---|
297 | | - Rectangle baseSpot = calcHotSpot(temp, info); |
---|
| 307 | + Rectangle baseSpot = calcHotSpot(temp); //, info); |
---|
298 | 308 | LA.xformPos(apex, toParent, temp); |
---|
299 | | - Rectangle apexSpot = calcHotSpot(temp, info); |
---|
300 | | - if (baseSpot.contains(info.x, info.y)) |
---|
| 309 | + Rectangle apexSpot = calcHotSpot(temp); //, info); |
---|
| 310 | + if (baseSpot.contains(clickInfo.x, clickInfo.y)) |
---|
301 | 311 | { |
---|
302 | 312 | hitSomething = 2; |
---|
303 | 313 | startRad = baseRadius; |
---|
304 | 314 | } else |
---|
305 | | - if (apexSpot.contains(info.x, info.y)) |
---|
| 315 | + if (apexSpot.contains(clickInfo.x, clickInfo.y)) |
---|
306 | 316 | { |
---|
307 | 317 | hitSomething = 3; |
---|
308 | 318 | startRad = apexRadius; |
---|
.. | .. |
---|
310 | 320 | { |
---|
311 | 321 | return false; |
---|
312 | 322 | } |
---|
313 | | - startX = info.x; |
---|
| 323 | + startX = clickInfo.x; |
---|
314 | 324 | return true; |
---|
315 | 325 | } |
---|
316 | 326 | |
---|
317 | | - void doEditDrag(ClickInfo info, boolean opposite) |
---|
| 327 | + void doEditDrag(//ClickInfo info, |
---|
| 328 | + boolean opposite) |
---|
318 | 329 | { |
---|
319 | 330 | if (hitSomething == 0) |
---|
320 | 331 | return; |
---|
321 | 332 | if (hitSomething == 1) |
---|
322 | 333 | { |
---|
323 | | - super.doEditDrag(info, opposite); |
---|
| 334 | + super.doEditDrag(//info, |
---|
| 335 | + opposite); |
---|
324 | 336 | return; |
---|
325 | 337 | } |
---|
326 | | - double deltaR = info.x - startX; |
---|
| 338 | + double deltaR = clickInfo.x - startX; |
---|
327 | 339 | double newRad = startRad + deltaR; |
---|
328 | 340 | if (newRad < 0) |
---|
329 | 341 | newRad = 0; |
---|
.. | .. |
---|
332 | 344 | else |
---|
333 | 345 | apexRadius = newRad; |
---|
334 | 346 | recalculate(); |
---|
335 | | - info.pane.repaint(); |
---|
| 347 | + clickInfo.pane.repaint(); |
---|
336 | 348 | } |
---|
337 | 349 | |
---|
338 | 350 | cVector base; |
---|