use of processing.core.PVector in project processing by processing.
the class PShapeOpenGL method getDepth.
@Override
public float getDepth() {
PVector min = new PVector(Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY, Float.POSITIVE_INFINITY);
PVector max = new PVector(Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY, Float.NEGATIVE_INFINITY);
if (shapeCreated) {
getVertexMin(min);
getVertexMax(max);
}
depth = max.z - min.z;
return depth;
}
use of processing.core.PVector in project processing by processing.
the class PShapeOpenGL method getNormal.
@Override
public PVector getNormal(int index, PVector vec) {
if (vec == null) {
vec = new PVector();
}
vec.x = inGeo.normals[3 * index + 0];
vec.y = inGeo.normals[3 * index + 1];
vec.z = inGeo.normals[3 * index + 2];
return vec;
}
use of processing.core.PVector in project processing by processing.
the class PShapeOpenGL method getVertex.
@Override
public PVector getVertex(int index, PVector vec) {
if (vec == null) {
vec = new PVector();
}
vec.x = inGeo.vertices[3 * index + 0];
vec.y = inGeo.vertices[3 * index + 1];
vec.z = inGeo.vertices[3 * index + 2];
return vec;
}
Aggregations