[Papervision3D] how to know camera's x-axis, y-axis in specific DisplayObject3D's coordinate system

Ben Chang ben.rb.chang at gmail.com
Fri Jun 29 03:58:29 EDT 2007


test! test!

why I can't see my question show on maillist??




2007/6/29, Ben Chang <ben.rb.chang at gmail.com>:
>
> camera's x-axis, y-axis might be a kind of Number3D, right?
>
> assume these are in the MovieScene3D's coordinate system.
>
> how to know these axis in specific DisplayObject3D's coordinate system???
>
> becouse, I want to rotate DisplayObject3D by these axis with rotateAxis(
> vector:Number3D, angle:Number ).
>
> I adjust some code in "DisplayObject3D.as" as follows :
>
>
>     public function pitch( angle:Number ):void
>     {
>         rotateAxis( RIGHT.clone(), angle );
>     }
>
>     public function yaw( angle:Number ):void
>     {
>         rotateAxis( UP.clone(), angle );
>     }
>
>     public function roll( angle:Number ):void
>     {
>         rotateAxis( FORWARD.clone(), angle );
>     }
>
>     public function rotateAxis( vector:Number3D, angle:Number ):void
>     {
>         angle = Papervision3D.useDEGREES? angle * toRADIANS : angle;
>
>         if( this._transformDirty ) updateTransform();
>
>         Matrix3D.rotateAxis( transform, vector );
>         var m:Matrix3D = Matrix3D.rotationMatrix( vector.x, vector.y,
> vector.z, angle );
>
>         this.transform.calculateMultiply3x3( m ,transform );
>
>         this._rotationDirty = true;
>     }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070629/9e115ced/attachment.htm


More information about the Papervision3D mailing list