[Papervision3D] Flip Matrix3D horizontally

Steve D kruass at gmail.com
Mon Apr 20 21:56:42 PDT 2009


How about:

m.calculateMultiply(m, Matrix3D.scaleMatrix(-1, 1, 1));

of course you'll need to make sure your material is double sided, disable
backface culling, or re-arrage your object's faces so that they are
clockwise, else the object wont be drawn.

:)


On Mon, Apr 20, 2009 at 2:25 PM, meandmybadself <meandmybadself at gmail.com>wrote:

>
> How would one flip a Matrix3D horizontally (like flip horizontal in
> Photoshop)?
>
> I'm thinking it would involve negating the x translation and flipping the y
> and z axis, but am having no luck implementing:
>
>        //create a rotation matrix to flip the z,y
>        var flipNum:Number3D = new Number3D(0, 180, 180);
>        var flipMat:Matrix3D = Matrix3D.euler2matrix(flipNum);
>        //multiply to apply.
>        var flippedMat:Matrix3D = Matrix3D.multiply(mat, flipMat);
>        //flip x translation
>        flippedMat.n14 = -flippedMat.n14
>
> --
> View this message in context:
> http://www.nabble.com/Flip-Matrix3D-horizontally-tp23128224p23128224.html
> Sent from the Papervision3D mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Papervision3D mailing list
> Papervision3D at osflash.org
> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20090420/12cba51b/attachment.html>


More information about the Papervision3D mailing list