Ejemplo n.º 1
0
 public static void MoveEndZ(this GuideObject go, float dist)
 {
     if (go.IsLimb() || go.IsArm())
     {
         FkJointRotater(go).MoveTo(go.transformTarget.position + new Vector3(0, 0, dist));
     }
 }
Ejemplo n.º 2
0
 public static void MoveEnd(this GuideObject go, Vector3 pos)
 {
     if (go.IsLimb() || go.IsArm())
     {
         FkJointRotater(go).MoveTo(pos);
     }
 }
Ejemplo n.º 3
0
 public static void Normals(this GuideObject go, float angle)
 {
     if (go.IsLimb() || go.IsArm())
     {
         FkJointRotater(go).Normals(angle);
     }
 }
Ejemplo n.º 4
0
 public static void Tangent(this GuideObject go, float angle)
 {
     if (go.IsLimb() || go.IsArm())
     {
         FkJointRotater(go).Tangent(angle);
     }
 }
Ejemplo n.º 5
0
 public static void Revolution(this GuideObject go, float angle)
 {
     if (go.IsLimb() || go.IsArm())
     {
         FkJointRotater(go).Revolution(angle);
     }
 }
Ejemplo n.º 6
0
 public static void Forward(this GuideObject go, float dist)
 {
     if (go.IsLimb() || go.IsArm())
     {
         FkJointRotater(go).Forward(dist);
     }
 }
Ejemplo n.º 7
0
        public static void Normals(this GuideObject go, float angle)
        {
            if (!go.IsLimb())
            {
                return;
            }
            var rotater = FkCharaMgr.BuildFkJointRotater(go);

            if (rotater == null)
            {
                return;
            }
            rotater.Normals(angle);
        }
Ejemplo n.º 8
0
        public static void Forward(this GuideObject go, float dist)
        {
            if (!go.IsLimb())
            {
                return;
            }
            var rotater = FkCharaMgr.BuildFkJointRotater(go);

            if (rotater == null)
            {
                return;
            }
            rotater.Forward(dist);
        }
Ejemplo n.º 9
0
        public static FkLimbRotater BuildFkJointRotater(GuideObject go)
        {
            //var chara = FkCharaMgr.BuildChara(go.transformTarget);
            var chara = FkCharaMgr.BuildChara(go);

            if (chara == null)
            {
                return(null);
            }
            var point = chara.DicTransBones[go.transformTarget];

            if (go.IsLimb())
            {
                return(new FkLimbRotater(point.Parent.Parent, point.Parent, point));
            }

            return(null);
        }
Ejemplo n.º 10
0
        public static IFkJointRotater FkJointRotater(GuideObject go)
        {
            var chara = FkCharaMgr.BuildChara(go.transformTarget);
            var point = chara.DicTransBones[go.transformTarget];

            if (go.IsLimb())
            {
                return(new FkLimbRotater(point.Parent.Parent, point.Parent));
            }
            if (go.IsArm())
            {
//                var root = new TransformFkJoint(point.Parent.Parent.Transform, point.Parent.Transform);
//                var end = new TransformFkJoint(point.Parent.Transform, point.Transform);
//                return new FkLimbRotater(root, end);
                var ano = point.Parent.Children.Filter(c => c != point)[0];
                return(new FkArmRotater(point.Parent.Parent, point.Parent, point, ano));
            }
            return(null);
        }