public static RenderGeometry CreateCubeStarGeometry(float size, float extrusion = 1, float cutTop = 0) { float extrusionScale = Mathf.Sqrt(2f) / 2; return(CreateCubeGeometryInternal( size * Vector3.one, dim => SurfaceComponentGeometries.CreateExtrudedPolygonCapGeometry(1, extrusion * extrusionScale, 4, 1, cutTop, dim, RenderGeometry.FaceType.Polygonal, true))); }
public static RenderGeometry CreateDodecahedronStarGeometry(float size, float extrusion, float cutTop) { int currentGroup = 0; float extrusionScale = Mathf.Sqrt(3) * (Mathf.Sqrt(5) + 1) / 4; return(CreateDodecahedronGeometryInternal( size, () => SurfaceComponentGeometries.CreateExtrudedPolygonCapGeometry(1, extrusion * extrusionScale, 5, 1, cutTop, currentGroup++, RenderGeometry.FaceType.Polygonal, true))); }