示例#1
0
        private static OutlineItem CreateOutlineItem(Skeleton skeleton, int boneIndex)
        {
            var item = new OutlineItem
            {
                Text = $"Bone {boneIndex} \"{skeleton.GetName(boneIndex)}\"",
                Icon = MultiColorGlyphs.Bone,
                Children = new OutlineItemCollection(),
                UserData = boneIndex,
            };

            for (int bone = 0; bone < skeleton.NumberOfBones; bone++)
                if (skeleton.GetParent(bone) == boneIndex)
                    item.Children.Add(CreateOutlineItem(skeleton, bone));

            return item;
        }
示例#2
0
        private static OutlineItem CreateOutlineItem(Skeleton skeleton)
        {
            var item = new OutlineItem
            {
                Text = $"Skeleton \"{skeleton.Name}\"",
                Icon = MultiColorGlyphs.Skeleton,
                IsExpanded = false,
                Children = new OutlineItemCollection(),
                UserData = skeleton,
            };

            for (int bone = 0; bone < skeleton.NumberOfBones; bone++)
                if (skeleton.GetParent(bone) == -1)
                    item.Children.Add(CreateOutlineItem(skeleton, bone));

            return item;
        }