[Papervision3D] adding copyTransform to Matrix3D and getting back a pure array
Carlos Ulloa
c4rl054321 at gmail.com
Thu Feb 8 17:00:26 EST 2007
Hello John,
Feel free to include it, but I maybe would call it toArray().
In DisplayObject3D there's already a already a new method
copyTransform( reference:* )
It copies the transfom Matrix3D of an DisplayObject3D instance (or just a
Matrix3D object, hence the *) to another instance.
So, after very recent debugging, this is finally working
camera.copyTransform( xWing );
It should effectively create a first person view from any object. Got to put
a few more planes on the floor and try it on the focus actually. :-)
We could also add a DisplayObject3D method we could call getTransformAsArray
that would do it for you directly. There's already a couple
getOperationAsString in AS3, not idea what they do, but I think it sounds
similar.
This functions have zero impact on performance, very low impact on footprint
or file size and can be very useful for other people.
I believe what we want is not just a 3D engine, but the most complete
interactive 3D framework we can build.
Microsoft XNA Game Studio is a good example of what we should dream with.
http://en.wikipedia.org/wiki/Microsoft_XNA
Go ahead and commit,
C4RL05
On 08/02/07, John Grden <neoriley at gmail.com> wrote:
>
> [ i'm posting this to the list for other comments ]
>
> Hey Carlos, do you think we can add this method to Matrix3D or do you
> think I should just create my own subclass and add this method?
>
> for passing the transform data over RTMP, I needed to create a basic
> array, and then on the receiving end, I pass that array to a new Matrix3D
> object etc. What do you think?
>
> *// my call looks like this:*
> starSystemConn.updateShip(red5ID, copyTransform(
> currentRotationObj.transform));
>
> public function copyTransform( m:Matrix3D ):Array
> {
> var ary:Array = new Array(
> m.n11, m.n12, m.n13, m.n14,
> m.n21, m.n22, m.n23, m.n24,
> m.n31, m.n32, m.n33, m.n34 ,
> m.n41, m.n42, m.n43, m.n44
> );
>
> return ary;
> }
> *I'd like it have it like this:*
> starSystemConn.updateShip(red5ID, currentRotationObj.copyTransform());
>
> --
> [ JPG ]
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
>
--
C4RL05
<font size="1">// <a href="http://noventaynueve.com" target="_blank"
onclick="return
top.js.OpenExtLink(window,event,this)">noventaynueve.com</a><br>//
<a href="http://papervision3d.org" target="_blank" onclick="return
top.js.OpenExtLink(window,event,this)">papervision3d.org</a><br></font>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070208/5e9d572c/attachment.htm
More information about the Papervision3D
mailing list