QuaternionRotation3D 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 QuaternionRotation3D 类的新实例。
重载
QuaternionRotation3D() |
初始化 QuaternionRotation3D 类的新实例。 |
QuaternionRotation3D(Quaternion) |
使用指定的 QuaternionRotation3D 初始化 Quaternion 类的新实例。 |
QuaternionRotation3D()
初始化 QuaternionRotation3D 类的新实例。
public:
QuaternionRotation3D();
public QuaternionRotation3D ();
Public Sub New ()
示例
//Read new settings
try
{
Double WValue = System.Convert.ToDouble(QuaternionWText.Text);
Double XValue = System.Convert.ToDouble(QuaternionXText.Text);
Double YValue = System.Convert.ToDouble(QuaternionYText.Text);
Double ZValue = System.Convert.ToDouble(QuaternionZText.Text);
endQuaternion = new Quaternion(XValue, YValue, ZValue, WValue);
}
catch
{
MessageBox.Show("Set non-null values for the quaternion.");
}
myQuaternionRotation3D = new QuaternionRotation3D(endQuaternion);
myRotateTransform3D.Rotation = myQuaternionRotation3D;
//update matrix display
qrotationMatrix3D = myRotateTransform3D.Value;
'Read new settings
Try
Dim WValue As Double = Convert.ToDouble(QuaternionWText.Text)
Dim XValue As Double = Convert.ToDouble(QuaternionXText.Text)
Dim YValue As Double = Convert.ToDouble(QuaternionYText.Text)
Dim ZValue As Double = Convert.ToDouble(QuaternionZText.Text)
endQuaternion = New Quaternion(XValue, YValue, ZValue, WValue)
Catch
MessageBox.Show("Set non-null values for the quaternion.")
End Try
myQuaternionRotation3D = New QuaternionRotation3D(endQuaternion)
myRotateTransform3D.Rotation = myQuaternionRotation3D
'update matrix display
qrotationMatrix3D = myRotateTransform3D.Value
适用于
QuaternionRotation3D(Quaternion)
使用指定的 QuaternionRotation3D 初始化 Quaternion 类的新实例。
public:
QuaternionRotation3D(System::Windows::Media::Media3D::Quaternion quaternion);
public QuaternionRotation3D (System.Windows.Media.Media3D.Quaternion quaternion);
new System.Windows.Media.Media3D.QuaternionRotation3D : System.Windows.Media.Media3D.Quaternion -> System.Windows.Media.Media3D.QuaternionRotation3D
Public Sub New (quaternion As Quaternion)
参数
- quaternion
- Quaternion
用于指定要对其进行插入的旋转的四元数。
示例
//Read new settings
try
{
Double WValue = System.Convert.ToDouble(QuaternionWText.Text);
Double XValue = System.Convert.ToDouble(QuaternionXText.Text);
Double YValue = System.Convert.ToDouble(QuaternionYText.Text);
Double ZValue = System.Convert.ToDouble(QuaternionZText.Text);
endQuaternion = new Quaternion(XValue, YValue, ZValue, WValue);
}
catch
{
MessageBox.Show("Set non-null values for the quaternion.");
}
myQuaternionRotation3D = new QuaternionRotation3D(endQuaternion);
myRotateTransform3D.Rotation = myQuaternionRotation3D;
//update matrix display
qrotationMatrix3D = myRotateTransform3D.Value;
'Read new settings
Try
Dim WValue As Double = Convert.ToDouble(QuaternionWText.Text)
Dim XValue As Double = Convert.ToDouble(QuaternionXText.Text)
Dim YValue As Double = Convert.ToDouble(QuaternionYText.Text)
Dim ZValue As Double = Convert.ToDouble(QuaternionZText.Text)
endQuaternion = New Quaternion(XValue, YValue, ZValue, WValue)
Catch
MessageBox.Show("Set non-null values for the quaternion.")
End Try
myQuaternionRotation3D = New QuaternionRotation3D(endQuaternion)
myRotateTransform3D.Rotation = myQuaternionRotation3D
'update matrix display
qrotationMatrix3D = myRotateTransform3D.Value