public static EffectorType ToEffectorType( EffectorLocation effectorLocation )
{
switch( effectorLocation ) {
case EffectorLocation.Root: return EffectorType.Root;
case EffectorLocation.Hips: return EffectorType.Hips;
case EffectorLocation.Neck: return EffectorType.Neck;
case EffectorLocation.Head: return EffectorType.Head;
case EffectorLocation.Eyes: return EffectorType.Eyes;
case EffectorLocation.LeftKnee: return EffectorType.Knee;
case EffectorLocation.RightKnee: return EffectorType.Knee;
case EffectorLocation.LeftFoot: return EffectorType.Foot;
case EffectorLocation.RightFoot: return EffectorType.Foot;
case EffectorLocation.LeftArm: return EffectorType.Arm;
case EffectorLocation.RightArm: return EffectorType.Arm;
case EffectorLocation.LeftElbow: return EffectorType.Elbow;
case EffectorLocation.RightElbow: return EffectorType.Elbow;
case EffectorLocation.LeftWrist: return EffectorType.Wrist;
case EffectorLocation.RightWrist: return EffectorType.Wrist;
}
if( (int)effectorLocation >= (int)EffectorLocation.LeftHandThumb &&
(int)effectorLocation <= (int)EffectorLocation.RightHandLittle ) {
return EffectorType.HandFinger;
}
return EffectorType.Unknown;
}