0

从 flash.geom.Matrix3D(Flash 10 中用于高级 3D 矩阵数学的新类)的实例获取“rawData”属性会导致 Vector。(也特定于 Flash 10)对象分配发生。有什么方法可以访问原始数据而不会产生这种对象分配开销?

由于我必须每帧多次访问此数据,因此它对性能配置文件有很大影响。

谢谢!

4

1 回答 1

1

I'm pretty sure there isn't. Apart from making sure that you're assigning into an existing reference, instead of creating a new vector every time, the only obvious option I see is to avoid accesses. So, make sure not to reaccess the data until it has changed, and for example if you merely do a translation, then instead of reaccessing the vector you could just perform the translation on the vector data from the last access.

于 2009-02-07T15:44:30.667 回答