Пример #1
0
        void Add2Branches(ref CompactHierarchy compactHierarchy, CompactNodeID parentID, out CompactNodeID branch0_ID, out CompactNodeID branch1_ID, int userID1 = 1, int userID2 = 2)
        {
            branch0_ID = compactHierarchy.CreateBranch(NodeID.Invalid, userID: userID1);
            branch1_ID = compactHierarchy.CreateBranch(NodeID.Invalid, userID: userID2);
            compactHierarchy.AttachToParent(parentID, branch0_ID);
            compactHierarchy.AttachToParent(parentID, branch1_ID);
            var siblingIndex0 = compactHierarchy.SiblingIndexOf(branch0_ID);
            var siblingIndex1 = compactHierarchy.SiblingIndexOf(branch1_ID);

            Assume.That((0, 1), Is.EqualTo((siblingIndex0, siblingIndex1)));
            Assume.That((compactHierarchy.ParentOf(branch0_ID), compactHierarchy.ParentOf(branch1_ID)), Is.EqualTo((parentID, parentID)));
            ref var child0 = ref compactHierarchy.GetChildRefAt(parentID, 0);
Пример #2
0
 void Add2Branches(ref CompactHierarchy compactHierarchy, out CompactNodeID branch0_ID, out CompactNodeID branch1_ID, int userID1 = 1, int userID2 = 2)
 {
     Add2Branches(ref compactHierarchy, compactHierarchy.RootID, out branch0_ID, out branch1_ID, userID1, userID2);
 }
Пример #3
0
 public static bool IsBrushVisible(CompactNodeID brushID)
 {
     return(visibilityStateLookup.TryGetValue(brushID, out VisibilityState state) && state == VisibilityState.AllVisible);
 }