android - 3D rotation while object being translated -


i've been playing android animation framework , found following 3d rotation sample code:

http://developer.android.com/resources/samples/apidemos/src/com/example/android/apis/animation/transition3d.html

http://developer.android.com/resources/samples/apidemos/src/com/example/android/apis/animation/rotate3danimation.html

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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -