SA.FullBodyIK.ToBoneSide C# (CSharp) Method

ToBoneSide() public static method

public static ToBoneSide ( BoneLocation boneLocation ) : Side
boneLocation BoneLocation
return Side
		public static Side ToBoneSide( BoneLocation boneLocation )
		{
			switch( boneLocation ) {
			case BoneLocation.LeftEye:			return Side.Left;
			case BoneLocation.RightEye:			return Side.Right;

			case BoneLocation.LeftLeg:			return Side.Left;
			case BoneLocation.RightLeg:			return Side.Right;
			case BoneLocation.LeftKnee:			return Side.Left;
			case BoneLocation.RightKnee:		return Side.Right;
			case BoneLocation.LeftFoot:			return Side.Left;
			case BoneLocation.RightFoot:		return Side.Right;

			case BoneLocation.LeftShoulder:		return Side.Left;
			case BoneLocation.RightShoulder:	return Side.Right;
			case BoneLocation.LeftArm:			return Side.Left;
			case BoneLocation.RightArm:			return Side.Right;
			case BoneLocation.LeftElbow:		return Side.Left;
			case BoneLocation.RightElbow:		return Side.Right;
			case BoneLocation.LeftWrist:		return Side.Left;
			case BoneLocation.RightWrist:		return Side.Right;
			}

			if( (int)boneLocation >= (int)BoneLocation.LeftHandThumb0 &&
				(int)boneLocation <= (int)BoneLocation.LeftHandLittleTip ) {
				return Side.Left;
			}

			if( (int)boneLocation >= (int)BoneLocation.LeftArmRoll0 &&
				(int)boneLocation <= (int)BoneLocation.LeftArmRoll0 + MaxArmRollLength - 1 ) {
				return Side.Left;
			}

			if( (int)boneLocation >= (int)BoneLocation.RightArmRoll0 &&
				(int)boneLocation <= (int)BoneLocation.RightArmRoll0 + MaxArmRollLength - 1 ) {
				return Side.Right;
			}

			if( (int)boneLocation >= (int)BoneLocation.LeftElbowRoll0 &&
				(int)boneLocation <= (int)BoneLocation.LeftElbowRoll0 + MaxElbowRollLength - 1 ) {
				return Side.Left;
			}

			if( (int)boneLocation >= (int)BoneLocation.RightElbowRoll0 &&
				(int)boneLocation <= (int)BoneLocation.RightElbowRoll0 + MaxElbowRollLength - 1 ) {
				return Side.Right;
			}

			if( (int)boneLocation >= (int)BoneLocation.RightHandThumb0 &&
				(int)boneLocation <= (int)BoneLocation.RightHandLittleTip ) {
				return Side.Right;
			}

			return Side.None;
		}
FullBodyIK