Esempio n. 1
0
    public static PrimVUT addPos(PrimVUT vut, int x, int y, int z)
    {
        Vector3 addition = new Vector3(x, y, z);

        for (int i = 0; i < vut.vertices.Length; i++)
        {
            vut.vertices[i] += addition;
        }
        return(vut);
    }
Esempio n. 2
0
 // Use this for initialization
 void Awake()
 {
     Blocks    = new byte[Width, Height, Width];
     Vuts      = new PrimVUT[Width, Height, Width];
     MainVUT   = new VUT(new List <Vector3>(), new List <Vector2>(), new List <int>());
     mFilter   = GetComponent <MeshFilter>();
     mRenderer = GetComponent <MeshRenderer>();
     mCollider = GetComponent <MeshCollider>();
     MyMesh    = mFilter.mesh;
     //MyMesh.MarkDynamic();
     enabled = false;
 }