public GraphicMeshSet(float width, float height) { Vector2 size = new Vector2(width, height); this.meshes[0] = (this.meshes[1] = (this.meshes[2] = MeshMakerPlanes.NewPlaneMesh(size, false, true, false))); this.meshes[3] = MeshMakerPlanes.NewPlaneMesh(size, true, true, false); }
public GraphicMeshSet(float width, float height) { Vector2 size = new Vector2(width, height); meshes[0] = (meshes[1] = (meshes[2] = MeshMakerPlanes.NewPlaneMesh(size, flipped: false, backLift: true, twist: false))); meshes[3] = MeshMakerPlanes.NewPlaneMesh(size, flipped: true, backLift: true, twist: false); }
static MeshPool() { MeshPool.humanlikeBodySet = new GraphicMeshSet(1.5f); MeshPool.humanlikeHeadSet = new GraphicMeshSet(1.5f); MeshPool.humanlikeHairSetAverage = new GraphicMeshSet(1.5f); MeshPool.humanlikeHairSetNarrow = new GraphicMeshSet(1.3f, 1.5f); MeshPool.plane025 = MeshMakerPlanes.NewPlaneMesh(0.25f); MeshPool.plane03 = MeshMakerPlanes.NewPlaneMesh(0.3f); MeshPool.plane05 = MeshMakerPlanes.NewPlaneMesh(0.5f); MeshPool.plane08 = MeshMakerPlanes.NewPlaneMesh(0.8f); MeshPool.plane10 = MeshMakerPlanes.NewPlaneMesh(1f); MeshPool.plane10Back = MeshMakerPlanes.NewPlaneMesh(1f, false, true); MeshPool.plane10Flip = MeshMakerPlanes.NewPlaneMesh(1f, true); MeshPool.plane14 = MeshMakerPlanes.NewPlaneMesh(1.4f); MeshPool.plane20 = MeshMakerPlanes.NewPlaneMesh(2f); MeshPool.planes = new Dictionary <Vector2, Mesh>(FastVector2Comparer.Instance); MeshPool.planesFlip = new Dictionary <Vector2, Mesh>(FastVector2Comparer.Instance); MeshPool.circle = MeshMakerCircles.MakeCircleMesh(1f); MeshPool.pies = new Mesh[361]; for (int i = 0; i < 361; i++) { MeshPool.pies[i] = MeshMakerCircles.MakePieMesh(i); } MeshPool.wholeMapPlane = MeshMakerPlanes.NewWholeMapPlane(); }
static MeshPool() { for (int i = 0; i < 361; i++) { MeshPool.pies[i] = MeshMakerCircles.MakePieMesh(i); } MeshPool.wholeMapPlane = MeshMakerPlanes.NewWholeMapPlane(); }
public static Mesh GridPlaneFlip(Vector2 size) { if (!planesFlip.TryGetValue(size, out var value)) { value = MeshMakerPlanes.NewPlaneMesh(size, flipped: true, backLift: false, twist: false); planesFlip.Add(size, value); } return value; }
public static Mesh GridPlane(Vector2 size) { if (!planes.TryGetValue(size, out Mesh value)) { value = MeshMakerPlanes.NewPlaneMesh(size, flipped: false, backLift: false, twist: false); planes.Add(size, value); } return(value); }
public static Mesh GridPlaneFlip(Vector2 size) { Mesh mesh; if (!MeshPool.planesFlip.TryGetValue(size, out mesh)) { mesh = MeshMakerPlanes.NewPlaneMesh(size, true, false, false); MeshPool.planesFlip.Add(size, mesh); } return(mesh); }
public static Mesh GridPlane(Vector2 size) { Mesh mesh = default(Mesh); if (!MeshPool.planes.TryGetValue(size, out mesh)) { mesh = MeshMakerPlanes.NewPlaneMesh(size, false, false, false); MeshPool.planes.Add(size, mesh); } return(mesh); }
public static Mesh NewWholeMapPlane() { Mesh mesh = MeshMakerPlanes.NewPlaneMesh(2000f, false, false); Vector2[] array = new Vector2[4]; for (int i = 0; i < 4; i++) { array[i] = mesh.uv[i] * 200f; } mesh.uv = array; return(mesh); }
public GraphicMeshSet(float size) { this.meshes[0] = (this.meshes[1] = (this.meshes[2] = MeshMakerPlanes.NewPlaneMesh(size, false, true))); this.meshes[3] = MeshMakerPlanes.NewPlaneMesh(size, true, true); }
public GraphicMeshSet(float size) { meshes[0] = (meshes[1] = (meshes[2] = MeshMakerPlanes.NewPlaneMesh(size, flipped: false, backLift: true))); meshes[3] = MeshMakerPlanes.NewPlaneMesh(size, flipped: true, backLift: true); }
public static Mesh NewPlaneMesh(float size, bool flipped, bool backLift, bool twist) { return(MeshMakerPlanes.NewPlaneMesh(new Vector2(size, size), flipped, backLift, twist)); }
public static Mesh NewPlaneMesh(float size, bool flipped) { return(MeshMakerPlanes.NewPlaneMesh(size, flipped, false)); }
public static Mesh NewPlaneMesh(float size) { return(MeshMakerPlanes.NewPlaneMesh(size, false)); }