コード例 #1
0
        public static JointType GetSidedJointType(SidedJointName name, JointSide side)
        {
            switch (name)
            {
            case (SidedJointName.Ankle):
                return((side == JointSide.Left) ? JointType.AnkleLeft : JointType.AnkleRight);

            case (SidedJointName.Elbow):
                return((side == JointSide.Left) ? JointType.ElbowLeft : JointType.ElbowRight);

            case (SidedJointName.Foot):
                return((side == JointSide.Left) ? JointType.FootLeft : JointType.FootRight);

            case (SidedJointName.Hand):
                return((side == JointSide.Left) ? JointType.HandLeft : JointType.HandRight);

            case (SidedJointName.HandTip):
                return((side == JointSide.Left) ? JointType.HandTipLeft : JointType.HandTipRight);

            case (SidedJointName.Hip):
                return((side == JointSide.Left) ? JointType.HipLeft : JointType.HipRight);

            case (SidedJointName.Knee):
                return((side == JointSide.Left) ? JointType.KneeLeft : JointType.KneeRight);

            case (SidedJointName.Shoulder):
                return((side == JointSide.Left) ? JointType.ShoulderLeft : JointType.ShoulderRight);

            case (SidedJointName.Thumb):
                return((side == JointSide.Left) ? JointType.ThumbLeft : JointType.ThumbRight);

            case (SidedJointName.Wrist):
                return((side == JointSide.Left) ? JointType.WristLeft : JointType.WristRight);

            default:
                throw new ArgumentException();
            }
        }
コード例 #2
0
ファイル: JointTypeHelper.cs プロジェクト: mhusinsky/prepose
        public static JointType GetSidedJointType(SidedJointName name, JointSide side)
        {
            switch (name)
            {
                case (SidedJointName.Ankle):
                    return (side == JointSide.Left) ? JointType.AnkleLeft : JointType.AnkleRight;
                case (SidedJointName.Elbow):
                    return (side == JointSide.Left) ? JointType.ElbowLeft : JointType.ElbowRight;
                case (SidedJointName.Foot):
                    return (side == JointSide.Left) ? JointType.FootLeft : JointType.FootRight;
                case (SidedJointName.Hand):
                    return (side == JointSide.Left) ? JointType.HandLeft : JointType.HandRight;
                case (SidedJointName.HandTip):
                    return (side == JointSide.Left) ? JointType.HandTipLeft : JointType.HandTipRight;
                case (SidedJointName.Hip):
                    return (side == JointSide.Left) ? JointType.HipLeft : JointType.HipRight;
                case (SidedJointName.Knee):
                    return (side == JointSide.Left) ? JointType.KneeLeft : JointType.KneeRight;
                case (SidedJointName.Shoulder):
                    return (side == JointSide.Left) ? JointType.ShoulderLeft : JointType.ShoulderRight;
                case (SidedJointName.Thumb):
                    return (side == JointSide.Left) ? JointType.ThumbLeft : JointType.ThumbRight;
                case (SidedJointName.Wrist):
                    return (side == JointSide.Left) ? JointType.WristLeft : JointType.WristRight;

                default:
                    throw new ArgumentException();
            }
        }