Exemplo n.º 1
0
        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);
        }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 static MeshPool()
 {
     for (int i = 0; i < 361; i++)
     {
         MeshPool.pies[i] = MeshMakerCircles.MakePieMesh(i);
     }
     MeshPool.wholeMapPlane = MeshMakerPlanes.NewWholeMapPlane();
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 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);
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
0
 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);
 }
Exemplo n.º 11
0
 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);
 }
Exemplo n.º 12
0
 public static Mesh NewPlaneMesh(float size, bool flipped, bool backLift, bool twist)
 {
     return(MeshMakerPlanes.NewPlaneMesh(new Vector2(size, size), flipped, backLift, twist));
 }
Exemplo n.º 13
0
 public static Mesh NewPlaneMesh(float size, bool flipped)
 {
     return(MeshMakerPlanes.NewPlaneMesh(size, flipped, false));
 }
Exemplo n.º 14
0
 public static Mesh NewPlaneMesh(float size)
 {
     return(MeshMakerPlanes.NewPlaneMesh(size, false));
 }