In the code for PGraphics.java:
I think the methods modelX() modelY() and modelZ() should call the depthError() instead of the depthErrorXYZ().
Quote: /**
* Returns the model space x value for an x, y, z coordinate.
* <P>
* This will give you a coordinate after it has been transformed
* by translate(), rotate(), and camera(), but not yet transformed
* by the projection matrix. For instance, his can be useful for
* figuring out how points in 3D space relate to the edge
* coordinates of a shape.
*/
public float modelX(float x, float y, float z) {
depthErrorXYZ("modelX");
return 0;
}
where depthErrorXYZ():
Quote: protected void depthErrorXYZ(String method) {
throw new RuntimeException(method + "(x, y, z) can only be used with " + "OPENGL or P3D, use " + method + "(x, y) instead.");}
Because this methods have no sense in the P2D renderer since the camera manipulations are not supported and the "sister" functions modelX(x,y) don't exist.