g.setFont(FONT);
// Draw hidden faces
if (enableHiddenFaces) {
for (int i = 0; i < hiddenFacesArray.length; i++) {
HullFace f = hiddenFacesArray[i];
HullVertex v = f.getVertex(0);
Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
Vector4 screenPos = prj.project(worldPos);
PointData p1 = new PointData(worldPos, screenPos, v);
v = f.getVertex(1);
worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
screenPos = prj.project(worldPos);
PointData p2 = new PointData(worldPos, screenPos, v);
v = f.getVertex(2);
worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
screenPos = prj.project(worldPos);
PointData p3 = new PointData(worldPos, screenPos, v);
drawFace(g, p1, p2, p3, f);
}
}
// Draw visible faces
if (enableVisibleFaces) {
for (int i = 0; i < visibleFacesArray.length; i++) {
HullFace f = visibleFacesArray[i];
HullVertex v = f.getVertex(0);
Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
Vector4 screenPos = prj.project(worldPos);
PointData p1 = new PointData(worldPos, screenPos, v);
v = f.getVertex(1);
worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
screenPos = prj.project(worldPos);
PointData p2 = new PointData(worldPos, screenPos, v);
v = f.getVertex(2);
worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
screenPos = prj.project(worldPos);
PointData p3 = new PointData(worldPos, screenPos, v);
drawFace(g, p1, p2, p3, f);