MixedRealityExtension.ProceduralToolkit.MeshDraft.AddQuad(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, bool, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2)

Here are the examples of the csharp api MixedRealityExtension.ProceduralToolkit.MeshDraft.AddQuad(UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, UnityEngine.Vector3, bool, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2, UnityEngine.Vector2) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : MeshDraft.cs
License : MIT License
Project Creator : microsoft

public MeshDraft AddFlatQuadBand(IList<Vector3> lowerRing, IList<Vector3> upperRing, bool generateUV)
		{
			if (lowerRing.Count != upperRing.Count)
			{
				throw new ArgumentException("Array sizes must be equal");
			}
			if (lowerRing.Count < 3)
			{
				throw new ArgumentException("Array sizes must be greater than 2");
			}

			Vector2 uv00 = new Vector2(0, 0);
			Vector2 uv10 = new Vector2(1, 0);
			Vector2 uv01 = new Vector2(0, 1);
			Vector2 uv11 = new Vector2(1, 1);

			Vector3 lower0, upper0, lower1, upper1;
			for (int i = 0; i < lowerRing.Count - 1; i++)
			{
				lower0 = lowerRing[i];
				lower1 = lowerRing[i + 1];
				upper0 = upperRing[i];
				upper1 = upperRing[i + 1];
				if (generateUV)
				{
					AddQuad(lower1, upper1, upper0, lower0, true, uv00, uv01, uv11, uv10);
				}
				else
				{
					AddQuad(lower1, upper1, upper0, lower0, true);
				}
			}

			lower0 = lowerRing[lowerRing.Count - 1];
			lower1 = lowerRing[0];
			upper0 = upperRing[upperRing.Count - 1];
			upper1 = upperRing[0];
			if (generateUV)
			{
				AddQuad(lower1, upper1, upper0, lower0, true, uv00, uv01, uv11, uv10);
			}
			else
			{
				AddQuad(lower1, upper1, upper0, lower0, true);
			}
			return this;
		}