基坐标系转换
举个例子:
我想让一个点p在当前显示器坐标系下右边移动m,
1.构造出当前显示器的变换矩阵transformScreen;
2.将pt坐标转换成显示器坐标系下的坐标:
ptScreen=transformScreen.Inverse.ofpoint(pt);
ptScreen+=(m,0,0);//移动
3.再将点转换成世界坐标系:
ptResult=transformScreen.ofpoint(ptScreen);
坐标系还可以用来求投影,
举个例子:
我想让一个点p在当前显示器坐标系下右边移动m,
1.构造出当前显示器的变换矩阵transformScreen;
2.将pt坐标转换成显示器坐标系下的坐标:
ptScreen=transformScreen.Inverse.ofpoint(pt);
ptScreen+=(m,0,0);//移动
3.再将点转换成世界坐标系:
ptResult=transformScreen.ofpoint(ptScreen);
坐标系还可以用来求投影,