(PShape who)
| 412 | |
| 413 | |
| 414 | @Override |
| 415 | public void addChild(PShape who) { |
| 416 | if (who instanceof PShapeOpenGL) { |
| 417 | if (family == GROUP) { |
| 418 | PShapeOpenGL c3d = (PShapeOpenGL)who; |
| 419 | |
| 420 | super.addChild(c3d); |
| 421 | c3d.updateRoot(root); |
| 422 | markForTessellation(); |
| 423 | |
| 424 | if (c3d.family == GROUP) { |
| 425 | if (c3d.textures != null) { |
| 426 | for (PImage tex: c3d.textures) { |
| 427 | addTexture(tex); |
| 428 | } |
| 429 | } else { |
| 430 | untexChild(true); |
| 431 | } |
| 432 | if (c3d.strokedTexture) { |
| 433 | strokedTexture(true); |
| 434 | } |
| 435 | } else { |
| 436 | if (c3d.image != null) { |
| 437 | addTexture(c3d.image); |
| 438 | if (c3d.stroke) { |
| 439 | strokedTexture(true); |
| 440 | } |
| 441 | } else { |
| 442 | untexChild(true); |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | } else { |
| 447 | PGraphics.showWarning("Cannot add child shape to non-group shape."); |
| 448 | } |
| 449 | } else { |
| 450 | PGraphics.showWarning("Shape must be OpenGL to be added to the group."); |
| 451 | } |
| 452 | } |
| 453 | |
| 454 | |
| 455 | @Override |
no test coverage detected