我有一个高度为 50 的层,我正在围绕 x 轴旋转它。. . 随着旋转的进行,我如何计算高度?
CATransform3D subLayerTransform = CATransform3DMakeTranslation(0, 0, 0);
subLayerTransform.m34 = -1 / 1800; //How does height relate to perspective and angle?
subLayerTransform = CATransform3DTranslate(subLayerTransform, 0, 0, 0);
subLayerTransform = CATransform3DRotate(subLayerTransform, 45 * (M_PI / 180), 1, 0, 0);
_transitionLayer.sublayerTransform = subLayerTransform;