jPCT - a 3d engine for Java > Support

Sorting

(1/1)

AGP:
This is more of a programming question than a jpct question. But since it's for sorting the bones I'm importing off of GLB in jpct, this is as good a place as any to ask it. So I'm writing a 2d skeleton viewer. Each bone knows its parent, and that's about all the information I have on them. Since I know it's a bipedal skeleton generated with Mixamo, I know the skeleton's shape. All I need is to sort the bones and draw them out. I'm doing this to verify that the parent/child relationship is accurate. What's the best way to run through the 2d List<Bone> and produce a sorted array? Now that I asked the question I realize that it's not a linear list, it's a tree. Any ideas?

EgonOlsen:
Sorry for the late reply...not sure on what metric to sort such a thing, though. As you've mentioned, it doesn't seem to be a list. And a tree would most likely reflect the parent-child relationship.

Navigation

[0] Message Index

Go to full version