public UVertex align(UVertex vv) { if (is2D) { return vv.rotZ(angle2D); } Vector3D v = toVector(vv); v = rot.applyInverseTo(v); return vv.set(v.getX(), v.getY(), v.getZ()); }
public void init() { if (main.nav == null) main.nav = new UNav3D(); UVertex v = new UVertex(1000, 0, 0); f = new UFace().set(v.copy(), v.copy().rotY(120 * DEG_TO_RAD), v.copy().rotY(240 * DEG_TO_RAD)); f.reverse(); UVertex.rotX(f.getV(), PI / 6); UVertex.rotZ(f.getV(), PI * 0.33f); UMB.log(f.getV()); f.rotX(f.rnd(TWO_PI)).rotZ(f.rnd(TWO_PI)); fv = UIntersections.faceYPlane(f, 0); lines = null; UMB.log(UMB.str(fv, ' ', null)); plane = UGeoGenerator.meshPlane(2000, 2000, 20).rotX(HALF_PI); }