Method
shape
(PShape shape, float x, float y, float z)
Source from the content-addressed store, hash-verified
| 3309 | |
| 3310 | // TODO unapproved |
| 3311 | @Override |
| 3312 | protected void shape(PShape shape, float x, float y, float z) { |
| 3313 | if (shape.isVisible()) { // don't do expensive matrix ops if invisible |
| 3314 | flush(); |
| 3315 | |
| 3316 | pushMatrix(); |
| 3317 | |
| 3318 | if (shapeMode == CENTER) { |
| 3319 | translate(x - shape.getWidth() / 2, y - shape.getHeight() / 2, |
| 3320 | z - shape.getDepth() / 2); |
| 3321 | |
| 3322 | } else if ((shapeMode == CORNER) || (shapeMode == CORNERS)) { |
| 3323 | translate(x, y, z); |
| 3324 | } |
| 3325 | shape.draw(this); |
| 3326 | |
| 3327 | popMatrix(); |
| 3328 | } |
| 3329 | } |
| 3330 | |
| 3331 | |
| 3332 | // TODO unapproved |
Callers
nothing calls this directly
Tested by
no test coverage detected