public SplineNode(SplineNode o) { this.point = o.point; this.rot = o.rot; this.normal = o.normal; this.tangent = o.tangent; this.time = o.time; }
public void AddPoint(Vector3 pos, float timeInSeconds) { SplineNode[] nodeArray = new SplineNode[this.nodes.Length + 1]; for (int i = 0; i < this.nodes.Length; i++) { nodeArray[i] = this.nodes[i]; } this.nodes = nodeArray; SplineNode node = new SplineNode(pos, timeInSeconds); this.nodes[this.nodes.Length - 1] = node; }
public SplineNode(SplineNode o) { this.point = Vector3.zero; this.rot = Quaternion.identity; this.normal = Vector3.zero; this.tangent = Vector3.zero; this.point = o.point; this.rot = o.rot; this.normal = o.normal; this.tangent = o.tangent; this.time = o.time; }
public void SetNodeCount(int c) { if (c < this.nodes.Length) { SplineNode[] array = new SplineNode[c]; for (int i = 0; i < c; i++) { array[i] = this.nodes[i]; } for (int j = c; j < this.nodes.Length; j++) { } this.nodes = array; } }
public void RemoveNode(int c) { if (c < 0 || c >= this.nodes.Length) { return; } SplineNode[] array = new SplineNode[this.nodes.Length - 1]; int num = 0; for (int i = 0; i < this.nodes.Length; i++) { if (i != c) { array[num] = this.nodes[i]; num++; } } this.nodes = array; }
public void RemoveNode(int c) { if ((c >= 0) && (c < this.nodes.Length)) { SplineNode[] nodeArray = new SplineNode[this.nodes.Length - 1]; int index = 0; for (int i = 0; i < this.nodes.Length; i++) { if (i != c) { nodeArray[index] = this.nodes[i]; index++; } } this.nodes = nodeArray; } }