MCPcopy Index your code
hub / github.com/processing/processing / addChild

Method addChild

core/src/processing/opengl/PShapeOpenGL.java:414–452  ·  view source on GitHub ↗
(PShape who)

Source from the content-addressed store, hash-verified

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

Callers 1

copyGroupMethod · 0.45

Calls 6

updateRootMethod · 0.95
markForTessellationMethod · 0.95
addTextureMethod · 0.95
untexChildMethod · 0.95
strokedTextureMethod · 0.95
showWarningMethod · 0.95

Tested by

no test coverage detected