(PGraphicsOpenGL pg, PShape src)
| 525 | |
| 526 | |
| 527 | public static PShapeOpenGL createShape(PGraphicsOpenGL pg, PShape src) { |
| 528 | PShapeOpenGL dest = null; |
| 529 | if (src.getFamily() == GROUP) { |
| 530 | //dest = PGraphics3D.createShapeImpl(pg, GROUP); |
| 531 | dest = (PShapeOpenGL) pg.createShapeFamily(GROUP); |
| 532 | copyGroup(pg, src, dest); |
| 533 | } else if (src.getFamily() == PRIMITIVE) { |
| 534 | //dest = PGraphics3D.createShapeImpl(pg, src.getKind(), src.getParams()); |
| 535 | dest = (PShapeOpenGL) pg.createShapePrimitive(src.getKind(), src.getParams()); |
| 536 | PShape.copyPrimitive(src, dest); |
| 537 | } else if (src.getFamily() == GEOMETRY) { |
| 538 | //dest = PGraphics3D.createShapeImpl(pg, PShape.GEOMETRY); |
| 539 | dest = (PShapeOpenGL) pg.createShapeFamily(PShape.GEOMETRY); |
| 540 | PShape.copyGeometry(src, dest); |
| 541 | } else if (src.getFamily() == PATH) { |
| 542 | dest = (PShapeOpenGL) pg.createShapeFamily(PShape.PATH); |
| 543 | //dest = PGraphics3D.createShapeImpl(pg, PATH); |
| 544 | PShape.copyPath(src, dest); |
| 545 | } |
| 546 | dest.setName(src.getName()); |
| 547 | dest.width = src.width; |
| 548 | dest.height = src.height; |
| 549 | dest.depth = src.depth; |
| 550 | return dest; |
| 551 | } |
| 552 | |
| 553 | |
| 554 | /* |
no test coverage detected