[X3D-Public] JavaScript: Question to SFMatrix3f.set/getTransform

Holger Seelig holger.seelig at yahoo.de
Mon Oct 20 10:05:15 PDT 2014


A matrix3 is coordinate system in 2d space, that has a origin (the translation) and a rotation and a scale and scaleOrientation. You Doug says, the first two values of the SFVec3f should be the complex number of the rotation, from that complex number I can calculate an angle. Should this be the third value?


Von Samsung Mobile gesendet

<div>-------- Ursprüngliche Nachricht --------</div><div>Von: doug sanden <highaspirations at hotmail.com> </div><div>Datum:20.10.2014  18:49  (GMT+01:00) </div><div>An: x3d-public at web3d.org </div><div>Betreff: Re: [X3D-Public] JavaScript: Question to SFMatrix3f.set/getTransform </div><div>
</div>I think matrix3 is a 2D homogenous transform, much like matrix4 is a 3D homogenous transform. For 3D a rotation has 4 values: a 3D direction vector for the axis of rotation, and 4th value for the rotation angle about that axis.
For matrix3 (2D), there would be something analogous, but with one less dimension. Likely 2 values xy for a point of rotation, and a 3rd value for the angle of rotation about that point. scale orientation in 2D would need a point and rotation.
-Doug


----------------------------------------
> Date: Mon, 20 Oct 2014 18:34:28 +0200
> From: holger.seelig at yahoo.de
> To: x3d-public at web3d.org
> Subject: [X3D-Public] JavaScript: Question to SFMatrix3f.set/getTransform
>
> I cannot figure out what are the second and fourth argument of
> SFMatrix.getTransform are, the spec says:
>
> SFMatrix3f .setTransform setTransform (SFVec2f translation,
> SFVec3f rotation,
> SFVec2f scale,
> SFVec3f scaleOrientation,
> SFVec2f center)
>
> I can see that a SFVec3f should be used for the rotation arguments, but
> I don't know what the three values (x,y,z) stand for. To my
> understanding like the TexureTransform node a matrix3 rotation is only a
> simple float. I know that simple numbers cannot be passed by value to a
> JavaScript function.
>
>
> --
> Holger Seelig
> Mediengestalter Digital – Digital Media Designer
>
> Scheffelstraße 31a
> 04277 Leipzig
>
> Telefon: 01577 147 26 11
> E-Mail: holger.seelig at yahoo.de
>
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
     
_______________________________________________
X3D-Public mailing list
X3D-Public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20141020/7fbf79e1/attachment.html>


More information about the X3D-Public mailing list