Exemple #1
0
		void Awake()
		{
			delaunayMesh = new DelaunayMesh(new Vector3(-10, 0, -10), 20f, 20f);

			string path = Path.Combine(EditorConstants.kOutputFolder, "delaunay.dm").Replace('\\', '/');
			delaunayMesh.Load(path);
		}
		void OnEnable()
		{
			SceneView.onSceneGUIDelegate += OnUpdateSceneGUI;

			plantedVertices = new List<Vector3>(kMaxVertices);
			editStates = new BitArray(kMaxVertices);

			delaunayMesh = new DelaunayMesh(new Vector3(-10f, 0, -10f), 20f, 20f);

			editorMeshViewer = new EditorMeshViewer(delaunayMesh);

			cmdSequence = new EditCommandSequence();
		}
		public CreateObstacleCommand(List<Vector3> vertices, DelaunayMesh mesh)
		{
			this.mesh = mesh;
			this.refVertices = vertices;
			this.savedVertices = new List<Vector3>(vertices);
		}
		public EditorMeshViewer(DelaunayMesh mesh)
		{
			this.mesh = mesh;
		}
		public CreateBorderSetCommand(List<Vector3> vertices, DelaunayMesh mesh, bool close)
		{
			this.mesh = mesh;
			this.refVertices = vertices;
			this.savedVertices = new List<Vector3>(vertices);
			this.close = close;
		}