コード例 #1
0
ファイル: ROD_ExportG.cs プロジェクト: sinushawa/ROD_Exporter
        public static void BuildBind(IINode _node, int _parentId, Pose _pose)
        {
            DualQuaternion DQ     = GetBoneBindDQ(_node);
            Joint          _joint = new Joint(_pose.joints.Count, _node.Name, _parentId, DQ, DualQuaternion.Identity);

            _pose.joints.Add(_joint);
            int childrensNb = _node.NumberOfChildren;

            for (int i = 0; i < childrensNb; i++)
            {
                if (!_node.GetChildNode(i).Name.EndsWith("Nub"))
                {
                    BuildBind(_node.GetChildNode(i), _joint.id, _pose);
                }
            }
        }
コード例 #2
0
ファイル: ROD_ExportG.cs プロジェクト: sinushawa/ROD_Exporter
        public static void BuildLJoint(IINode _node, int _parentId, Pose _pose, int[] _frames, int _f, int _samplingRate, Pose _bindPose)
        {
            DualQuaternion LDQ    = GetBoneLocalDQ(_node, _frames, _f);
            CurveHandle    curve  = GetCurve(_node, _frames, _f, _samplingRate);
            Joint          _joint = new Joint(_pose.joints.Count, _node.Name, _parentId, DualQuaternion.Identity, LDQ, curve);

            _pose.joints.Add(_joint);
            int childrensNb = _node.NumberOfChildren;

            for (int i = 0; i < childrensNb; i++)
            {
                if (!_node.GetChildNode(i).Name.EndsWith("Nub"))
                {
                    BuildLJoint(_node.GetChildNode(i), _joint.id, _pose, _frames, _f, _samplingRate, _bindPose);
                }
            }
        }
コード例 #3
0
ファイル: ROD_ExportG.cs プロジェクト: sinushawa/ROD_Exporter
 public static void BuildLJoint(IINode _node, int _parentId, Pose _pose, int _frame, ROD_ExportG r)
 {
     DualQuaternion WDQ = GetBoneWorldDQ(_node, _frame, r);
     DualQuaternion LDQ = GetBoneLocalDQ(_node, _frame, r);
     Joint _joint = new Joint(_pose.joints.Count, _node.Name, _parentId, WDQ, LDQ);
     _pose.joints.Add(_joint);
     int childrensNb = _node.NumberOfChildren;
     for (int i = 0; i < childrensNb; i++)
     {
         if (!_node.GetChildNode(i).Name.EndsWith("Nub"))
         {
             BuildLJoint(_node.GetChildNode(i), _joint.id, _pose, _frame, r);
         }
     }
 }
コード例 #4
0
ファイル: ROD_ExportG.cs プロジェクト: sinushawa/ROD_Exporter
 public static void BuildBind(IINode _node, int _parentId, Pose _pose, ROD_ExportG r)
 {
     DualQuaternion DQ = GetBoneBindDQ(_node, r);
     Joint _joint = new Joint(_pose.joints.Count, _node.Name, _parentId, DQ, DualQuaternion.Identity);
     _pose.joints.Add(_joint);
     int childrensNb = _node.NumberOfChildren;
     for (int i = 0; i < childrensNb; i++)
     {
         if (!_node.GetChildNode(i).Name.EndsWith("Nub"))
         {
             BuildBind(_node.GetChildNode(i), _joint.id, _pose, r);
         }
     }
 }