(float x, float y, float z, float u, float v)
| 1048 | |
| 1049 | |
| 1050 | protected void vertexImpl(float x, float y, float z, float u, float v) { |
| 1051 | if (!openShape) { |
| 1052 | PGraphics.showWarning(OUTSIDE_BEGIN_END_ERROR, "vertex()"); |
| 1053 | return; |
| 1054 | } |
| 1055 | |
| 1056 | if (family == GROUP) { |
| 1057 | PGraphics.showWarning("Cannot add vertices to GROUP shape"); |
| 1058 | return; |
| 1059 | } |
| 1060 | |
| 1061 | boolean textured = image != null; |
| 1062 | int fcolor = 0x00; |
| 1063 | if (fill || textured) { |
| 1064 | if (!textured) { |
| 1065 | fcolor = fillColor; |
| 1066 | } else { |
| 1067 | if (tint) { |
| 1068 | fcolor = tintColor; |
| 1069 | } else { |
| 1070 | fcolor = 0xffFFFFFF; |
| 1071 | } |
| 1072 | } |
| 1073 | } |
| 1074 | |
| 1075 | if (textureMode == IMAGE && image != null) { |
| 1076 | u /= image.width; |
| 1077 | v /= image.height; |
| 1078 | } |
| 1079 | |
| 1080 | int scolor = 0x00; |
| 1081 | float sweight = 0; |
| 1082 | if (stroke) { |
| 1083 | scolor = strokeColor; |
| 1084 | sweight = strokeWeight; |
| 1085 | } |
| 1086 | |
| 1087 | inGeo.addVertex(x, y, z, |
| 1088 | fcolor, |
| 1089 | normalX, normalY, normalZ, |
| 1090 | u, v, |
| 1091 | scolor, sweight, |
| 1092 | ambientColor, specularColor, emissiveColor, shininess, |
| 1093 | VERTEX, vertexBreak()); |
| 1094 | |
| 1095 | markForTessellation(); |
| 1096 | } |
| 1097 | |
| 1098 | |
| 1099 | protected boolean vertexBreak() { |
no test coverage detected