mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Some android sync
This commit is contained in:
@@ -838,7 +838,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
if (which > 0) {
|
||||
return hints[which];
|
||||
} else {
|
||||
return hints[-which];
|
||||
return !hints[-which];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1161,7 +1161,18 @@ public class PShape implements PConstants {
|
||||
return vertices[index];
|
||||
}
|
||||
|
||||
|
||||
public PVector getVertex(int index, PVector vec) {
|
||||
if (vec == null) {
|
||||
vec = new PVector();
|
||||
}
|
||||
vec.x = vertices[index][X];
|
||||
vec.y = vertices[index][Y];
|
||||
vec.z = vertices[index][Z];
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
public float getVertexX(int index) {
|
||||
return vertices[index][X];
|
||||
}
|
||||
@@ -1176,6 +1187,62 @@ public class PShape implements PConstants {
|
||||
return vertices[index][Z];
|
||||
}
|
||||
|
||||
public void setVertex(int index, float x, float y, float z) {
|
||||
vertices[index][X] = x;
|
||||
vertices[index][Y] = y;
|
||||
vertices[index][Z] = z;
|
||||
}
|
||||
|
||||
public PVector getNormal(int index, PVector vec) {
|
||||
if (vec == null) {
|
||||
vec = new PVector();
|
||||
}
|
||||
vec.x = vertices[index][NX];
|
||||
vec.y = vertices[index][NY];
|
||||
vec.z = vertices[index][NZ];
|
||||
return vec;
|
||||
}
|
||||
|
||||
public float getNormalX(int index) {
|
||||
return vertices[index][NX];
|
||||
}
|
||||
|
||||
public float getNormalY(int index) {
|
||||
return vertices[index][NY];
|
||||
}
|
||||
|
||||
public float getNormalZ(int index) {
|
||||
return vertices[index][NZ];
|
||||
}
|
||||
|
||||
public void setNormal(int index, float nx, float ny, float nz) {
|
||||
vertices[index][NX] = nx;
|
||||
vertices[index][NY] = ny;
|
||||
vertices[index][NZ] = nz;
|
||||
}
|
||||
|
||||
public PVector getVertexUV(int index, PVector vec) {
|
||||
if (vec == null) {
|
||||
vec = new PVector();
|
||||
}
|
||||
vec.x = vertices[index][U];
|
||||
vec.y = vertices[index][V];
|
||||
return vec;
|
||||
}
|
||||
|
||||
public float getVertexU(int index) {
|
||||
return vertices[index][U];
|
||||
}
|
||||
|
||||
public float getVertexV(int index) {
|
||||
return vertices[index][V];
|
||||
}
|
||||
|
||||
public void setVertexUV(int index, float u, float v) {
|
||||
vertices[index][U] = u;
|
||||
vertices[index][V] = v;
|
||||
}
|
||||
|
||||
|
||||
public int[] getVertexCodes() {
|
||||
if (vertexCodes == null) {
|
||||
|
||||
Reference in New Issue
Block a user