在Ios和android中制作相同的视角

时间:2018-06-10 17:14:07

标签: java android ios objective-c iphone

我在ios中有一个视图,我使用

旋转
CATransform3D rotationWithPerspective = CATransform3DIdentity;
rotationWithPerspective.m34 = -1.0/d;
rotationWithPerspective = CATransform3DRotate(rotationWithPerspective, angle, 0, 1, 0);

wh是d中的距离;

在使用

的android中做同样的事情
view.setRotaionY(value);
float scale = context.getResources().getDisplayMetrics().density;
view. setCameraDistance(d * scale);

这里的问题是如何在两者中实现相同的观点?如果有的话,d params之间的关系是什么? 感谢。

0 个答案:

没有答案