diff --git a/Assets/UniGLTF/UniHumanoid/Scripts/Format/Bvh.cs b/Assets/UniGLTF/UniHumanoid/Scripts/Format/Bvh.cs index 6c39c3b8f..1f8b9126e 100644 --- a/Assets/UniGLTF/UniHumanoid/Scripts/Format/Bvh.cs +++ b/Assets/UniGLTF/UniHumanoid/Scripts/Format/Bvh.cs @@ -44,8 +44,8 @@ namespace UniHumanoid case Channel.Xposition: case Channel.Yposition: case Channel.Zposition: return true; - case Channel.Xrotation: - case Channel.Yrotation: + case Channel.Xrotation: + case Channel.Yrotation: case Channel.Zrotation: return false; } @@ -149,7 +149,7 @@ namespace UniHumanoid public class EndSite : BvhNode { - public EndSite(): base("") + public EndSite() : base("") { } @@ -220,17 +220,17 @@ namespace UniHumanoid return false; } - foreach(var node in Root.Traverse()) + foreach (var node in Root.Traverse()) { - for(int i=0; i() { node.Name }; var current = node; - while (current!=null) + while (current != null) { current = GetParent(current); if (current != null) @@ -259,7 +259,7 @@ namespace UniHumanoid BvhNode GetParent(BvhNode node) { - foreach(var x in Root.Traverse()) + foreach (var x in Root.Traverse()) { if (x.Children.Contains(node)) { @@ -277,7 +277,7 @@ namespace UniHumanoid { for (int i = 0; i < node.Channels.Length; ++i, ++index) { - if(node==target && node.Channels[i] == channel) + if (node == target && node.Channels[i] == channel) { return Channels[index]; } @@ -302,7 +302,7 @@ namespace UniHumanoid FrameTime = TimeSpan.FromSeconds(seconds); m_frames = frames; var channelCount = Root.Traverse() - .Where(x => x.Channels!=null) + .Where(x => x.Channels != null) .Select(x => x.Channels.Length) .Sum(); Channels = Enumerable.Range(0, channelCount) @@ -318,7 +318,7 @@ namespace UniHumanoid { throw new BvhException("frame key count is not match channel count"); } - for(int i=0; i()); } @@ -382,7 +382,7 @@ namespace VRM.SimpleViewer break; case ".bvh": - LoadMotion(path); + LoadMotion(path, File.ReadAllText(path)); break; } }