DemoFramework.MeshFactory2.MakeUnityCubeMesh(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, Mesh)

Here are the examples of the csharp api DemoFramework.MeshFactory2.MakeUnityCubeMesh(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, Mesh) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

19 View Source File : MeshFactory2.cs
License : GNU General Public License v3.0
Project Creator : ppgia-unifor

public static void CreateBox2DShape(Box2DShape shape, Mesh mesh)
        {
            Vector3Array v = shape.Vertices;
            MakeUnityCubeMesh(v[0].ToUnity(), v[1].ToUnity(), v[2].ToUnity(), v[3].ToUnity(), v[4].ToUnity(), v[5].ToUnity(), v[6].ToUnity(), v[7].ToUnity(), mesh);
        }

19 View Source File : MeshFactory2.cs
License : GNU General Public License v3.0
Project Creator : ppgia-unifor

public static void CreateCube(CollisionShape cs, Mesh mesh) {

            BulletSharp.Math.Vector3 ext = ((BoxShape)cs).HalfExtentsWithMargin;
            float length = ext.X * 2f;
            float width = ext.Y * 2f;
            float height = ext.Z * 2f;


            UnityEngine.Vector3 p0 = new UnityEngine.Vector3(-length * .5f, -width * .5f, height * .5f);
            UnityEngine.Vector3 p1 = new UnityEngine.Vector3(length * .5f, -width * .5f, height * .5f);
            UnityEngine.Vector3 p2 = new UnityEngine.Vector3(length * .5f, -width * .5f, -height * .5f);
            UnityEngine.Vector3 p3 = new UnityEngine.Vector3(-length * .5f, -width * .5f, -height * .5f);

            UnityEngine.Vector3 p4 = new UnityEngine.Vector3(-length * .5f, width * .5f, height * .5f);
            UnityEngine.Vector3 p5 = new UnityEngine.Vector3(length * .5f, width * .5f, height * .5f);
            UnityEngine.Vector3 p6 = new UnityEngine.Vector3(length * .5f, width * .5f, -height * .5f);
            UnityEngine.Vector3 p7 = new UnityEngine.Vector3(-length * .5f, width * .5f, -height * .5f);

            MakeUnityCubeMesh(p0, p1, p2, p3, p4, p5, p6, p7, mesh);
        }