public void CreateFromPoly(string presetName, PolyHydra poly) { Name = presetName; AppearancePresetName = poly.APresetName; PolyType = poly.PolyType; GridType = poly.GridType; BypassOps = poly.BypassOps; PrismP = poly.PrismP; PrismQ = poly.PrismP; TwoSided = poly.TwoSided; Ops = new Op[poly.ConwayOperators.Count]; for (var index = 0; index < poly.ConwayOperators.Count; index++) { var polyOp = poly.ConwayOperators[index]; var op = new Op { OpType = polyOp.opType, FaceSelections = polyOp.faceSelections, Amount = polyOp.amount, Randomize = polyOp.randomize, Disabled = polyOp.disabled }; Ops[index] = op; } }
public RBFSurface(IList<double[]> fitpoints, IBasisFunction basis, PolyTypes poly, double relax) { switch (poly) { case PolyTypes.Plane: Poly = new RBFPolynomials.Plane(this); break; case PolyTypes.Paraboloid: Poly = new RBFPolynomials.Paraboloid(this); break; case PolyTypes.ParaboloidC: Poly = new RBFPolynomials.ParaboloidConst(this); break; case PolyTypes.Conic: Poly = new RBFPolynomials.Conic(this); break; } Basis = basis != null ? basis : new ThinPlateSpline(); Relaxation = relax; if (fitpoints != null) { Fit(fitpoints, null); } }
public List <Face> faces; // Array of Face instances public WythoffPoly(PolyTypes polyType, int p, int q) { string symbol = Uniform.Uniforms[((int)polyType) + 1].Wythoff; symbol = symbol.Replace("p", p.ToString()).Replace("q", q.ToString()); UnpackSym(symbol); _Polyhedron(); }
public PolyBuilder( PolyHydraEnums.ShapeTypes shapeType, PolyTypes polyType, PolyHydraEnums.JohnsonPolyTypes johnsonPolyType, PolyHydraEnums.GridTypes gridType, PolyHydraEnums.GridShapes gridShape, PolyHydraEnums.OtherPolyTypes otherPolyType ) { ShapeType = shapeType; PolyType = polyType; JohnsonPolyType = johnsonPolyType; GridType = gridType; GridShape = gridShape; OtherPolyType = otherPolyType; }
void Update() { if (Input.GetKeyDown("space")) { int num = (int)PolyType; num = (num + 1) % Uniform.Uniforms.Length; PolyType = (PolyTypes)num; gameObject.GetComponent <RotateObject>().Randomize(); MakePolyhedron(); } else if (Input.GetKeyDown("p")) { gameObject.GetComponent <RotateObject>().Pause(); } else if (Input.GetKeyDown("r")) { gameObject.GetComponent <RotateObject>().Randomize(); } else if (Input.GetKeyDown("1")) { meshFilter.sharedMesh = _polyhedron.Explode(); } }
private RBFNetwork2(uint nDim, IBasisFunction basis, PolyTypes poly) { m_rbfs = new RBFSurface[nDim]; for (uint i = 0; i < nDim; i++) { m_rbfs[i] = new RBFSurface(null, basis, poly, 0); } }