// Token: 0x06000980 RID: 2432 RVA: 0x00042E04 File Offset: 0x00041204 public static bool HierarchyIsValid(Transform[] bones) { for (int i = 1; i < bones.Length; i++) { if (!Hierarchy.IsAncestor(bones[i], bones[i - 1])) { return(false); } } return(true); }
// Token: 0x06000258 RID: 600 RVA: 0x0000FFA8 File Offset: 0x0000E3A8 public static bool HierarchyIsValid(IKSolver.Bone[] bones) { for (int i = 1; i < bones.Length; i++) { if (!Hierarchy.IsAncestor(bones[i].transform, bones[i - 1].transform)) { return(false); } } return(true); }
/* * Make sure the bones are in valid Hierarchy * */ public static bool HierarchyIsValid(IKSolver.Bone[] bones) { for (int i = 1; i < bones.Length; i++) { // If parent bone is not an ancestor of bone, the hierarchy is invalid if (!Hierarchy.IsAncestor(bones[i].transform, bones[i - 1].transform)) { return(false); } } return(true); }
// Token: 0x06000989 RID: 2441 RVA: 0x0004317C File Offset: 0x0004157C public static bool IsCommonAncestor(Transform transform, Transform[] transforms) { if (transform == null) { Debug.LogWarning("Transform is null."); return(false); } for (int i = 0; i < transforms.Length; i++) { if (transforms[i] == null) { Debug.Log("Transforms[" + i + "] is null."); return(false); } if (!Hierarchy.IsAncestor(transforms[i], transform) && transforms[i] != transform) { return(false); } } return(true); }
// Token: 0x06000986 RID: 2438 RVA: 0x0004301C File Offset: 0x0004141C public static Transform GetFirstCommonAncestor(Transform t1, Transform t2) { if (t1 == null) { return(null); } if (t2 == null) { return(null); } if (t1.parent == null) { return(null); } if (t2.parent == null) { return(null); } if (Hierarchy.IsAncestor(t2, t1.parent)) { return(t1.parent); } return(Hierarchy.GetFirstCommonAncestor(t1.parent, t2)); }
// Token: 0x06000982 RID: 2434 RVA: 0x00042E90 File Offset: 0x00041290 public static bool IsAncestor(Transform transform, Transform ancestor) { return(transform == null || ancestor == null || (!(transform.parent == null) && (transform.parent == ancestor || Hierarchy.IsAncestor(transform.parent, ancestor)))); }