Ejemplo n.º 1
0
        public void Add(SplitMesh mesh)
        {
            foreach (Triangle3D newTriangle in mesh.triangles)
            {
                newTriangle.idxV0 += triangles.Count;
                newTriangle.idxV1 += triangles.Count;
                newTriangle.idxV2 += triangles.Count;
            }

            triangles.AddRange(mesh.triangles);
            vertices.AddRange(mesh.vertices);
        }
Ejemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();
        SplitMesh myScript = (SplitMesh)target;

        if (Application.isPlaying)
        {
            if (GUILayout.Button("Split"))
            {
                myScript.Split();
            }
        }
    }
Ejemplo n.º 3
0
        public void Add(SplitMesh mesh)
        {
            foreach (Triangle3D newTriangle in mesh.triangles)
            {
                newTriangle.idxV0 += triangles.Count;
                newTriangle.idxV1 += triangles.Count;
                newTriangle.idxV2 += triangles.Count;
            }

            triangles.AddRange(mesh.triangles);
            vertices.AddRange(mesh.vertices);
        }