public NullSocketNode AppendSocketNode(int handle, int parent, Vector3 pos, Quaternion quat) { NullSocketNode node = new NullSocketNode(handle, parent, pos, quat); mSocketNodeArray.Add(node); return(node); }
protected bool RotateSocketNodes(NullSocketNodes socketNodes, float angle) { if (socketNodes == null || socketNodes.GetSocketCount() == 0) { return(false); } NullSocketNode rootSocketNode = socketNodes[0]; if (rootSocketNode != null) { Vector3 pos = rootSocketNode.GetPosition(); Quaternion quat = rootSocketNode.GetQuaternion(); Vector3 newPos = Vector3.zero; Quaternion newQuat = Quaternion.identity; Vector3RotateCalculation(angle, pos, ref newPos, false); QuaternionRotateCalculation(angle, quat, ref newQuat); rootSocketNode.SetPosition(newPos); rootSocketNode.SetQuaternion(newQuat); } return(true); }