public void RecalcCoord(S4Camera cam) { qBelow = true; int dim = Base.PDim; if (ExtraTwist != null) { for (int j = 0; j < dim; j++) { double s = 0; for (int k = 0; k < dim; k++) { s += ExtraTwist[k, j] * FCtr[k]; } CurPt[j] = s; } if (cam.AbovePlane(CurPt)) { qBelow = false; return; } } for (int i = 0; i < Base.NV; i++) { if (ExtraTwist != null) { for (int j = 0; j < dim; j++) { double s = 0; for (int k = 0; k < dim; k++) { s += ExtraTwist[k, j] * Coords[i * dim + k]; } CurPt[j] = s; } } else { for (int j = 0; j < dim; j++) { CurPt[j] = Coords[i * dim + j]; } } bool x = cam.Apply(CurPt, out Coords3D[i]); if (!x) { Coords3D[i].Z = WRONGPT; } } }