.. | .. |
---|
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 | + |
---|
| 201 | + double vFlip(double v) |
---|
| 202 | + { |
---|
| 203 | + return 1-v; |
---|
| 204 | + } |
---|
| 205 | + |
---|
195 | 206 | Vertex biparamFunction(double u, double v) |
---|
196 | 207 | { |
---|
197 | 208 | cVector tPos; |
---|
.. | .. |
---|
262 | 273 | editWindow = objectUI.GetEditor(); |
---|
263 | 274 | } |
---|
264 | 275 | |
---|
265 | | - void drawEditHandles(ClickInfo info, int level) |
---|
| 276 | + void drawEditHandles(//ClickInfo info, |
---|
| 277 | + int level) |
---|
266 | 278 | { |
---|
267 | | - super.drawEditHandles(info, level); |
---|
| 279 | + super.drawEditHandles(//info, |
---|
| 280 | + level); |
---|
268 | 281 | if (level == 1) |
---|
269 | 282 | { |
---|
270 | 283 | return; |
---|
.. | .. |
---|
272 | 285 | { |
---|
273 | 286 | cVector temp = new cVector(); |
---|
274 | 287 | LA.xformPos(base, toParent, temp); |
---|
275 | | - Rectangle baseSpot = calcHotSpot(temp, info); |
---|
| 288 | + Rectangle baseSpot = calcHotSpot(temp); //, info); |
---|
276 | 289 | 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); |
---|
| 290 | + Rectangle apexSpot = calcHotSpot(temp); //, info); |
---|
| 291 | + clickInfo.g.setColor(Color.green); |
---|
| 292 | + clickInfo.g.fillRect(baseSpot.x, baseSpot.y, baseSpot.width, baseSpot.height); |
---|
| 293 | + clickInfo.g.fillRect(apexSpot.x, apexSpot.y, apexSpot.width, apexSpot.height); |
---|
281 | 294 | return; |
---|
282 | 295 | } |
---|
283 | 296 | } |
---|
284 | 297 | |
---|
285 | | - boolean doEditClick(ClickInfo info, int level) |
---|
| 298 | + boolean doEditClick(//ClickInfo info, |
---|
| 299 | + int level) |
---|
286 | 300 | { |
---|
287 | 301 | //if (level == 0) |
---|
288 | 302 | //return false; |
---|
289 | 303 | hitSomething = 0; |
---|
290 | | - if (super.doEditClick(info, level)) |
---|
| 304 | + if (super.doEditClick(//info, |
---|
| 305 | + level)) |
---|
291 | 306 | { |
---|
292 | 307 | hitSomething = 1; |
---|
293 | 308 | return true; |
---|
294 | 309 | } |
---|
295 | 310 | cVector temp = new cVector(); |
---|
296 | 311 | LA.xformPos(base, toParent, temp); |
---|
297 | | - Rectangle baseSpot = calcHotSpot(temp, info); |
---|
| 312 | + Rectangle baseSpot = calcHotSpot(temp); //, info); |
---|
298 | 313 | LA.xformPos(apex, toParent, temp); |
---|
299 | | - Rectangle apexSpot = calcHotSpot(temp, info); |
---|
300 | | - if (baseSpot.contains(info.x, info.y)) |
---|
| 314 | + Rectangle apexSpot = calcHotSpot(temp); //, info); |
---|
| 315 | + if (baseSpot.contains(clickInfo.x, clickInfo.y)) |
---|
301 | 316 | { |
---|
302 | 317 | hitSomething = 2; |
---|
303 | 318 | startRad = baseRadius; |
---|
304 | 319 | } else |
---|
305 | | - if (apexSpot.contains(info.x, info.y)) |
---|
| 320 | + if (apexSpot.contains(clickInfo.x, clickInfo.y)) |
---|
306 | 321 | { |
---|
307 | 322 | hitSomething = 3; |
---|
308 | 323 | startRad = apexRadius; |
---|
.. | .. |
---|
310 | 325 | { |
---|
311 | 326 | return false; |
---|
312 | 327 | } |
---|
313 | | - startX = info.x; |
---|
| 328 | + startX = clickInfo.x; |
---|
314 | 329 | return true; |
---|
315 | 330 | } |
---|
316 | 331 | |
---|
317 | | - void doEditDrag(ClickInfo info) |
---|
| 332 | + void doEditDrag(//ClickInfo info, |
---|
| 333 | + boolean opposite) |
---|
318 | 334 | { |
---|
319 | 335 | if (hitSomething == 0) |
---|
320 | 336 | return; |
---|
321 | 337 | if (hitSomething == 1) |
---|
322 | 338 | { |
---|
323 | | - super.doEditDrag(info); |
---|
| 339 | + super.doEditDrag(//info, |
---|
| 340 | + opposite); |
---|
324 | 341 | return; |
---|
325 | 342 | } |
---|
326 | | - double deltaR = info.x - startX; |
---|
| 343 | + double deltaR = clickInfo.x - startX; |
---|
327 | 344 | double newRad = startRad + deltaR; |
---|
328 | 345 | if (newRad < 0) |
---|
329 | 346 | newRad = 0; |
---|
.. | .. |
---|
332 | 349 | else |
---|
333 | 350 | apexRadius = newRad; |
---|
334 | 351 | recalculate(); |
---|
335 | | - info.pane.repaint(); |
---|
| 352 | + clickInfo.pane.repaint(); |
---|
336 | 353 | } |
---|
337 | 354 | |
---|
338 | 355 | cVector base; |
---|