本文整理汇总了C#中System.Windows.Media.Media3D.Matrix3D.SetIdentity方法的典型用法代码示例。如果您正苦于以下问题:C# Matrix3D.SetIdentity方法的具体用法?C# Matrix3D.SetIdentity怎么用?C# Matrix3D.SetIdentity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Media.Media3D.Matrix3D
的用法示例。
在下文中一共展示了Matrix3D.SetIdentity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Matrix3
public Matrix3()
{
Identity3();
Matrix3D m3 = new Matrix3D();
m3.SetIdentity();
}
示例2: Needle
public Needle()
{
kinematics = new NeedleKinematics();
// initializing the center, head and tail
center = new Matrix3D();
center.SetIdentity();
head0 = new Matrix3D();
head0.SetIdentity();
head0.M14 = -radius;
tail0 = new Matrix3D();
tail0.SetIdentity();
tail0.M14 = radius;
real_half = new Vector3D[n];
imag_half = new Vector3D[n];
// initializing points
for (int i = 0; i < n; i++)
{
real_half[i].X = radius * Math.Cos((double)i / (n - 1) * Math.PI);
real_half[i].Y = -radius * Math.Sin((double)i / (n - 1) * Math.PI);
real_half[i].Z = 0;
imag_half[i].X = -radius * Math.Cos((double)i / (n - 1) * Math.PI);
imag_half[i].Y = radius * Math.Sin((double)i / (n - 1) * Math.PI);
imag_half[i].Z = 0;
}
// initializing the moved head
double angle = -Math.PI / (n - 1);
Matrix3D rotZ = new Matrix3D(Math.Cos(angle), -Math.Sin(angle), 0, 0,
Math.Sin(angle), Math.Cos(angle), 0, 0,
0, 0, 1, 0,
0, 0, 0, 1);
moved_head0 = Matrix3D.Multiply(rotZ, head0);
}