三维动画/摄像机转型和现代化设备 [英] 3d animation / Camera transformation and modern devices

查看:165
本文介绍了三维动画/摄像机转型和现代化设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用我有办法3D转换 android.graphics.Camera 。它似乎做工精细,直到我尝试的Nexus。

In my app I have 3d transformations by means android.graphics.Camera. It seemed to work fine until I tried Nexus.

我安装在Nexus 7(4.2.1)和Galaxy Nexus的(4.1.2)的应用程序,他们两人根本不进行改造摄像头。我有一个摄像头和都显示非标准动画两种不同的意见,但并不适用于摄像头变换。

I installed the app on Nexus 7 (4.2.1) and Galaxy Nexus (4.1.2), both of them don't perform Camera transformation at all. I have two different views with Camera and both show standart animation and doesn't apply Camera transformations.

谁能解释这样的行为?

UPD:
相机code

UPD: camera code

transformation.clear();     
transformation.setTransformationType(Transformation.TYPE_MATRIX);   
mCamera.save();     
final Matrix matrix = transformation.getMatrix();         
mCamera.translate(x,y,z);  
mCamera.getMatrix(matrix);  
matrix.preTranslate(-centerX, -centerY);        
matrix.postTranslate(centerX, centerY);         
mCamera.restore();

UPD2:
银河S3(4.2),而与S2(4.0.4)

UPD2: the same with Galaxy S3 (4.2), but not with S2 (4.0.4)

推荐答案

只需添加到getChildStaticTransformation年底

Just add to the end of getChildStaticTransformation

if (android.os.Build.VERSION.SDK_INT >= 16 /*JellyBean*/) child.invalidate();

这篇关于三维动画/摄像机转型和现代化设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆