Example #1
0
 protected void AddChildIDToParent(CompiledPhysicalBone bone)
 {
     // Root bone parent ID will be zero.
     if (bone.parentID != 0)
     {
         CompiledPhysicalBone parent = PhysicalBoneList.Where(a => a.ControllerID == bone.parentID).FirstOrDefault();  // Should only be one parent.
         parent.childIDs.Add(bone.ControllerID);
     }
 }
 public List <CompiledPhysicalBone> GetAllChildBones(CompiledPhysicalBone bone)
 {
     if (bone.NumChildren > 0)
     {
         return(PhysicalBoneList.Where(a => bone.childIDs.Contains(a.ControllerID)).ToList());
     }
     else
     {
         return(null);
     }
 }
Example #3
0
 public List <CompiledPhysicalBone> GetAllChildBones(CompiledPhysicalBone bone) => bone.NumChildren > 0 ? PhysicalBoneList.Where(a => bone.childIDs.Contains(a.ControllerID)).ToList() : null;