各坐标的转换:

各坐标的转换:
1.WorldToScreenPoint:

Transforms position from world space into screen space.

从世界空间到屏幕空间变换位置。

Screenspace is defined in pixels. The bottom-left of the screen is (0,0); the right-top is (pixelWidth,pixelHeight). The z position is in world units from the camera.

屏幕空间以像素定义,屏幕左下为0,0,右上是(pixelWidth,pixelHeight),Z的位置是以世界单位衡量的到相机的距离。


2.ScreenToWorldPoint:

Transforms position from screen space into world space.

从屏幕空间到世界空间的变化位置。

Screenspace is defined in pixels. The bottom-left of the screen is (0,0); the right-top is (pixelWidth,pixelHeight). The z position is in world units from the camera.

屏幕空间以像素定义。屏幕的左下为(0,0);右上是(pixelWidth,pixelHeight),Z的位置是以世界单位衡量的到相机的距离。


3.WorldToViewportPoint:

Transforms position from world space into viewport space.

从世界空间到视窗空间的变换位置。

Viewport space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1). The z position is in world units from the camera.

视口空间是归一化的并相对于相机的。相机的左下为(0,0);右上是(1,1),Z的位置是以世界单位衡量的到相机的距离。


4.ViewportToWorldPoint:

Transforms position from viewport space into world space.

从视窗空间到世界空间的变换位置。

Viewport space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1). The z position is in world units from the camera.

视口空间是归一化的并相对于相机的,相机的左下为(0,0);右上是(1,1);Z的位置是以世界单位衡量的到相机的距离。

Note that it transforms a x-y screen position, into a x-y-z position in 3D space.

请注意它是变换一个x-y屏幕位置到一个3D空间的x-y-z位置。

You provide the function with a vector where the x-y components of the vector are the screen coordinates and the z component is the distance of the resulting plane from the camera.

这个函数带有在屏幕坐标的x-y组件向量,并且z组件是在从相机产生的平面的距离。


5.ViewportToScreenPoint:

Transforms position from viewport space into screen space.

从视口空间到屏幕空间的变换位置。

Viewport space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1). The z position is in world units from the camera.

视口空间是规范化的并相对于相机。相机的左下为(0,0),右上是(1,1),Z的位置是以世界单位衡量的到相机的距离。

Screenspace is defined in pixels. The bottom-left of the screen is (0,0); the right-top is (pixelWidth,pixelHeight). The z position is in world units from the camera.

屏幕空间以像素定义。屏幕的左下为(0,0);右上是(pixelWidth,pixelHeight),Z的位置是以世界单位衡量的到相机的距离。


6.ScreenToViewportPoint

Transforms position from screen space into viewport space.

从屏幕空间到视窗空间的变换位置。

Screenspace is defined in pixels. The bottom-left of the screen is (0,0); the right-top is (pixelWidth,pixelHeight). The z position is in world units from the camera.

屏幕空间以像素定义。屏幕的左下为(0,0);右上是(pixelWidth,pixelHeight),Z的位置是以世界单位衡量的到相机的距离。

Viewport space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1). The z position is in world units from the camera.

视口空间是规范化的并相对于相机。相机的左下为(0,0);右上是(1,1),Z的位置是以世界单位衡量的到相机的距离。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Bricke

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值