android - 3D rotation while object being translated -
i've been playing android animation framework , found following 3d rotation sample code:
it pretty want want imageview rotate while it's being translated point point b , should rotate along it's own center(which moving) instead of center of container of screen.
does know how that?
-rachel
well it's pretty close posted. you're multiplying rotational matrix translation matrix. that's happens under covers. android hides detail it's api:
matrix matrix = transformation.getmatrix(); matrix.rotate( rotatex, rotatey ); matrix.posttranslate( transx, transy );
rotate first translate rotate image around it's own axis first before translating it.
Comments
Post a Comment