Hi Rob,

I don't think this is correct. When you add or subtract, it reduces the result to a Vector3D instance, and not a Number3D instance. This seems to be the new parallel:


var difference:Number3D = new Number3D ();
difference = difference.subtract (firstPoint, secondPoint);


vs.


var differenceTemp:Vector3D = firstPoint.subtract (secondPoint);
var difference:Number3D = new Number3D (differenceTemp.x, differenceTemp.y, differenceTemp.z);



In some ways this new method is more comfortable, but having to re-instantiate the result as a Number3D is kind of a pain. Do you think it might be possible to at least add a new method to make this easier ... maybe something like this?


var difference:Number3D = Number3D.fromVector (firstPoint.subtract (secondPoint));




On Tue, 14 Sep 2010 06:47:25 -0700, Rob Bateman <[email protected]> wrote:

Hey guys

today an update has been made to the main fp10 trunk that incorporates a few
major refactors. The impact of these on code compatibility should be
minimal, but there are a few necessary changes that have had to be made as
we move forward.

First of all, we have (finally) replaced all MatrixAway3D references with
fp10's native Matrix3D class. This has allowed us to switch to faster
projection techniques for vertices, which should for the majority of Away3D
apps be seen as a slight speed increase. There have also been some other
optimising measures brought in from Lite, such as radix sorting of faces,
etc

In the interest of improved memory handling, there have also been a huge
amount of updates carried out to improve memory consumption, and provide a
more stable memory base. This is not yet perfected, but the majority of
applications should see improvements here as well

Following on from memory optimisations, both screenvertex and number3d now
inherit from vector3d. These changes mean a slight alteration will be
required for any apps that use these classes. Primarily, the differences lie
in the way these objects are added, subtracted etc. Where previously you
would add two number3d objects by doing:

new number3DResult:Number3D - new Number3D();
number3DResult.add(number3D1, number3D2);


you will now need to do:

new number3DResult:Number3D = number3D1.add(number3D2);

The old player 9 memory problems of generating extra number3d instances are
no longer an issue in 10.1, and the above way of working is generally
considered a standard when dealing with 3D vectors, hence the change. The
same thing follows for the native Matrix3D class - where before you would
transform a number3d with the following:

new number3DResult:Number3D - new Number3D();
number3DResult.transform(oldNumber3D, transformMatrix);

you can now do the same using native objects:

new vector3DResult:Vector3D = transformMatrix.transformVector(oldVector3D);


aside from these slight syntactic changes, the engine should operate as
normal. If anyone experiences any bugs, please report them in this thread!

Enjoy the new release!


Rob


Reply via email to