Exemplo n.º 1
0
    /// <summary>
    /// Get bosy Area in world space rect Draw Clockwise
    /// </summary>
    /// <returns></returns>
    public SubRig[] GetBodyRig()
    {
        SubRig[] body = new SubRig[4];

        body[0] = new SubRig(R_Hand_Shoulder_3D, R_Hand_Elbows_3D, R_Hand_Wrists_3D);
        body[1] = new SubRig(L_Hand_Shoulder_3D, L_Hand_Elbows_3D, L_Hand_Wrists_3D);
        body[3] = new SubRig(L_Leg_Hip_3D, L_Leg_Knees_3D, L_Leg_Ankles_3D);
        body[2] = new SubRig(R_Leg_Hip_3D, R_Leg_Knees_3D, R_Leg_Ankles_3D);

        return(body);
    }
Exemplo n.º 2
0
    private void Drawing(Rig rig)
    {
        //Get Body Data
        SubRig R_hand = rig.GetSubRig("R_Hand");
        SubRig L_hand = rig.GetSubRig("L_Hand");
        SubRig L_leg  = rig.GetSubRig("L_Leg");
        SubRig R_leg  = rig.GetSubRig("R_Leg");

        SubRig[] body = rig.GetBodyRig();

        //Draw Line in 3D Space
        rig.DrawLine(R_hand, Lines3D[0]);
        rig.DrawLine(L_hand, Lines3D[1]);
        rig.DrawLine(R_leg, Lines3D[2]);
        rig.DrawLine(L_leg, Lines3D[3]);
        rig.DrawLine(body, Lines3D[4]);
    }
Exemplo n.º 3
0
    public void DrawLine(SubRig sub_rig, GameObject L_rendereer, bool is3D = true)
    {
        LineRenderer rend = L_rendereer.GetComponent <LineRenderer>() == null?L_rendereer.AddComponent <LineRenderer>() : L_rendereer.GetComponent <LineRenderer>();

        rend.startWidth    = 0.1f;
        rend.endWidth      = 0.1f;
        rend.positionCount = 3;
        if (is3D)
        {
            rend.SetPosition(0, sub_rig.Root_3D);
            rend.SetPosition(1, sub_rig.Center_3D);
            rend.SetPosition(2, sub_rig.Destintion_3D);
        }
        else
        {
            rend.SetPosition(0, sub_rig.Root_2D);
            rend.SetPosition(1, sub_rig.Center_2D);
            rend.SetPosition(2, sub_rig.Destintion_2D);
        }
    }
Exemplo n.º 4
0
 public void DrawSphere(SubRig sub_rig, GameObject A, GameObject B, GameObject C)
 {
     A.transform.localPosition = sub_rig.Root_3D;
     B.transform.localPosition = sub_rig.Center_3D;
     C.transform.localPosition = sub_rig.Destintion_3D;
 }