private static ValueAxis GetAxis( string varName )
{
if ( varName.Length == 1 )
switch ( varName[0] ) {
case 'x':
return ValueAxis.X;
case 'y':
return ValueAxis.Y;
case 'z':
return ValueAxis.Z;
}
throw new ArgumentException( "value axis " + varName + " is not valid, must be one of 'x', 'y', or 'z'" );
}