private void BuildHierarchy(ModelBone node, Matrix parentTransform, int level) { node.ModelTransform = node.Transform * parentTransform; foreach (var child in node.Children) { BuildHierarchy(child, node.ModelTransform, level + 1); } //string s = string.Empty; // //for (int i = 0; i < level; i++) //{ // s += "\t"; //} // //Debug.WriteLine("{0}:{1}", s, node.Name); }
public void AddChild(ModelBone modelBone) { children.Add(modelBone); Children = new ModelBoneCollection(children); }