Beispiel #1
0
 public static HumanBodyBones ToUnity(this VrmLib.HumanoidBones bone)
 {
     if (bone == VrmLib.HumanoidBones.unknown)
     {
         return(HumanBodyBones.LastBone);
     }
     return(VrmLib.EnumUtil.Cast <HumanBodyBones>(bone));
 }
Beispiel #2
0
 static void AssignHumanoid(List <VrmLib.Node> nodes, UniGLTF.Extensions.VRMC_vrm.HumanBone humanBone, VrmLib.HumanoidBones key)
 {
     if (nodes == null)
     {
         throw new ArgumentNullException("nodes");
     }
     if (humanBone != null && humanBone.Node.HasValue)
     {
         var index = humanBone.Node.Value;
         if (index >= 0 && index < nodes.Count)
         {
             nodes[index].HumanoidBone = key;
         }
         else
         {
             throw new IndexOutOfRangeException("AssignHumanoid");
         }
     }
 }
Beispiel #3
0
 static void AssignHumanoid(List <VrmLib.Node> nodes, UniGLTF.Extensions.VRMC_vrm.HumanBone humanBone, VrmLib.HumanoidBones key)
 {
     if (humanBone != null && humanBone.Node.HasValue)
     {
         nodes[humanBone.Node.Value].HumanoidBone = key;
     }
 }