wpsppt页面卷曲在哪里_在Android上实现页面卷曲?

我正在网上冲浪,寻找在Android上翻页的良好效果,但似乎没有。由于我正在学习平台,因此能够做到这一点似乎很不错。

我设法在这里找到一个页面:http : //wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html

- (void)deform

{

Vertex2f  vi;   // Current input vertex

Vertex3f  v1;   // First stage of the deformation

Vertex3f *vo;   // Pointer to the finished vertex

CGFloat R, r, beta;

for (ushort ii = 0; ii < numVertices_; ii++)

{

// Get the current input vertex.

vi    = inputMesh_[ii];

// Radius of the circle circumscribed by vertex (vi.x, vi.y) around A on the x-y plane

R     = sqrt(vi.x * vi.x + pow(vi.y - A, 2));

// Now get the radius of the cone cross section intersected by our vertex in 3D space.

r     = R * sin(theta);

// Angle subtended by arc |ST| on the cone cross section.

beta  = asin(vi.x / R) / sin(theta);

// *** MAGIC!!! ***

v1.x  = r * sin(beta);

v1.y  = R + A - r * (1 - cos(beta)) * sin(theta);

v1.z  = r * (1 - cos(beta)) * cos(theta);

// Apply a basic rotation transform around the y axis to rotate the curled page.

// These two steps could be combined through simple substitution, but are left

// separate to keep the math simple for debugging and illustrative purposes.

vo    = &outputMesh_[ii];

vo->x = (v1.x * cos(rho) - v1.z * sin(rho));

vo->y =  v1.y;

vo->z = (v1.x * sin(rho) + v1.z * cos(rho));

}

}

给出了iPhone的示例代码(上面),但是我不知道如何在android上实现它。那里的任何数学神都可以帮助我解决如何在Android Java中实现这一点。

是否可以使用本机的绘图API,我是否必须使用openGL?我可以以某种方式模仿行为吗?

任何帮助,将不胜感激。谢谢。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值