Exemple #1
0
	public void CreateMesh(){
		if (mesh5D == null)
			return;

		if (transform5D == null) {
			transform5D = GetComponent<Transform5D> ();
			if (transform5D == null)
				return;
		}
		foreach (Transform trans in transform.GetComponentsInChildren<Transform>()) {
			if (trans != transform && trans != null)
				DestroyImmediate (trans.gameObject);
		}
		mesh4D = Transform4D.CreateEmpty ();
		mesh4D.transform.SetParent (transform);

		MeshRenderer4D renderer = mesh4D.GetComponent<MeshRenderer4D> ();

		Vector4[] projectedVertices = getProjectedVertices ();
		renderer.mesh4D.vertices = projectedVertices;
		renderer.mesh4D.edges = mesh5D.edges;

		renderer.CreateMesh ();
		meshCreated = true;
	}
Exemple #2
0
 public void StartAnimation()
 {
     if (targetObject == null)
     {
         targetObject = GetComponent <Transform5D> ();
         if (targetObject == null)
         {
             return;
         }
     }
     StartCoroutine("Animate");
     isAnimating = true;
 }