第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在Android上實現(xiàn)頁面卷曲?

在Android上實現(xiàn)頁面卷曲?

慕哥6287543 2019-12-11 13:09:19
我正在網(wǎng)上沖浪,尋找在Android上翻頁的良好效果,但似乎沒有。由于我正在學(xué)習平臺,因此能夠做到這一點似乎很不錯。我設(shè)法在這里找到一個頁面: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 vertexCGFloat 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上實現(xiàn)它。那里的任何數(shù)學(xué)神都可以幫助我解決如何在Android Java中實現(xiàn)這一點。是否可以使用本機的繪圖API,我是否必須使用openGL?我可以以某種方式模仿行為嗎?任何幫助,將不勝感激。謝謝。
查看完整描述

3 回答

  • 3 回答
  • 0 關(guān)注
  • 406 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號