Quaternion.Parse(String) 方法

定义

Quaternion 的字符串表示形式转换为等效的 Quaternion 结构。Converts a string representation of a Quaternion into the equivalent Quaternion structure.

public:
 static System::Windows::Media::Media3D::Quaternion Parse(System::String ^ source);
public static System.Windows.Media.Media3D.Quaternion Parse (string source);
static member Parse : string -> System.Windows.Media.Media3D.Quaternion
Public Shared Function Parse (source As String) As Quaternion

参数

source
String

Quaternion 的字符串表示形式。A string representation of a Quaternion.

返回

Quaternion

用字符串表示的 QuaternionQuaternion represented by the string.

示例

try
{
    endQuaternion = Quaternion.Parse(ParseValue.Text);
}
catch
{
    ParseValue.Text = "Must input (X, Y, Z, W)";
}

endRotation.Quaternion = endQuaternion;
Try
    endQuaternion = Quaternion.Parse(ParseValue.Text)
Catch
    ParseValue.Text = "Must input (X, Y, Z, W)"
End Try

endRotation.Quaternion = endQuaternion

适用于