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; }
public static ConwayPoly Build(PolyHydraEnums.JohnsonPolyTypes johnsonPolyType, int sides) { ConwayPoly poly; switch (johnsonPolyType) { case PolyHydraEnums.JohnsonPolyTypes.Prism: poly = Prism(sides); break; case PolyHydraEnums.JohnsonPolyTypes.Antiprism: poly = Antiprism(sides); break; case PolyHydraEnums.JohnsonPolyTypes.Pyramid: poly = Pyramid(sides); break; case PolyHydraEnums.JohnsonPolyTypes.ElongatedPyramid: poly = ElongatedPyramid(sides); break; case PolyHydraEnums.JohnsonPolyTypes.GyroelongatedPyramid: poly = GyroelongatedPyramid(sides); break; case PolyHydraEnums.JohnsonPolyTypes.Dipyramid: poly = Dipyramid(sides); break; case PolyHydraEnums.JohnsonPolyTypes.ElongatedDipyramid: poly = ElongatedDipyramid(sides); break; case PolyHydraEnums.JohnsonPolyTypes.GyroelongatedDipyramid: poly = GyroelongatedDipyramid(sides); break; case PolyHydraEnums.JohnsonPolyTypes.Cupola: poly = Cupola(sides); break; case PolyHydraEnums.JohnsonPolyTypes.ElongatedCupola: poly = ElongatedCupola(sides); break; case PolyHydraEnums.JohnsonPolyTypes.GyroelongatedCupola: poly = GyroelongatedCupola(sides); break; case PolyHydraEnums.JohnsonPolyTypes.OrthoBicupola: poly = OrthoBicupola(sides); break; case PolyHydraEnums.JohnsonPolyTypes.GyroBicupola: poly = GyroBicupola(sides); break; case PolyHydraEnums.JohnsonPolyTypes.ElongatedOrthoBicupola: poly = ElongatedBicupola(sides, false); break; case PolyHydraEnums.JohnsonPolyTypes.ElongatedGyroBicupola: poly = ElongatedBicupola(sides, true); break; case PolyHydraEnums.JohnsonPolyTypes.GyroelongatedBicupola: poly = GyroelongatedBicupola(sides, false); break; case PolyHydraEnums.JohnsonPolyTypes.Rotunda: poly = Rotunda(); break; case PolyHydraEnums.JohnsonPolyTypes.ElongatedRotunda: poly = ElongatedRotunda(); break; case PolyHydraEnums.JohnsonPolyTypes.GyroelongatedRotunda: poly = GyroelongatedRotunda(); break; case PolyHydraEnums.JohnsonPolyTypes.GyroelongatedBirotunda: poly = GyroelongatedBirotunda(); break; default: poly = new ConwayPoly(); break; } return(poly); }