[英]What are the coordinates of a display object that has been transformed with a PerspectiveProjection?
I'm currently transforming some objects to make them appear far away using a PerspectiveTransform
. 我目前正在使用
PerspectiveTransform
变换一些对象,使它们看起来很远。 This works well, but I have no way of knowing where on the screen the object is displayed. 这很好用,但是我无法知道对象在屏幕上的何处显示。 The x and y coordinates are the coordinates of the object if it were at
z=0
. x和y坐标是对象在
z=0
处的坐标。 How can I compute the display coordinates of my component? 如何计算组件的显示坐标?
What about the flash.display.DisplayObject
's localToGlobal
and globalToLocal
methods? 那
flash.display.DisplayObject
的localToGlobal
和globalToLocal
方法呢? Each takes a point from the first space and returns a transformed point in the second space. 每个都从第一个空间获取一个点,然后在第二个空间中返回一个变换的点。
EDIT: 编辑:
Also see the local3DtoGlobal
and globalToLocal3D
methods for 3D transformations. 另请参阅用于3D转换的
local3DtoGlobal
和globalToLocal3D
方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.