【正文】
透明度為 30%,而原地板紋理圖像是不透明的(如圖、圖 )。最小值為 0,表示距離 攝像機(jī) 最近的裁剪面的距離。 float moveZ = (normalZ * radius * ) / sum。 圖 方案修正原理圖 因此最終實(shí)現(xiàn)的效果如圖。 360 * (n 1) / N X Z WIDTH 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 26頁(yè) 比較方案 其實(shí)無(wú)論采取哪種方案,都必須控制 N 值的范圍,否則會(huì)出現(xiàn)如圖 ,、圖 理 想情況。 然后,依據(jù)傳遞過(guò)來(lái)的圖像數(shù)組的長(zhǎng)度(即圖像數(shù)量 N)計(jì)算出每幅圖像頂點(diǎn)的 xz 坐標(biāo)。 doDraw(canvas, bitmaps[1], new float[] { 0, 0, width, 0, width, height, 0, height }, new float[] { x, 0, width, height * (1 / + value), width, height * (63 / value), x, height })。 } /** 轉(zhuǎn)屏期間,一次獲得圖像便可 以 */ if (!isGetBitmap) { isGetBitmap = true。 } 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 18頁(yè) 第 3 章 開(kāi)發(fā)模擬 3D 主題樣式 說(shuō)明與概述 圖 模擬 3D 主題樣式 如圖 是模擬 3D 主題樣式,模擬 3D 主題樣式實(shí)現(xiàn)的效果是通過(guò)取得前后兩個(gè)子視圖的圖像,根據(jù)觸摸點(diǎn)的 x 坐標(biāo),在屏幕上以固定的夾角、不同的視覺(jué)方向來(lái)繪制兩幅圖像,從而模擬真 實(shí)世界的 3D 效果。 float shininessMaterial[] = { }。 } 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 16頁(yè) 發(fā)射紅色光。而在OpenGL ES 中不能給一個(gè)頂點(diǎn)分配多個(gè)法向量,因此一般采用的處理方法是此處的頂點(diǎn)屬于幾個(gè)面就在此處放置幾個(gè)位置相同的頂點(diǎn),并為這幾個(gè)頂點(diǎn)分別指定屬于面的法向量。因此,如果散射光從正面照射物體表面,它看起來(lái)就顯得更亮一些。 ① 吳亞峰 蘇亞光 .Android 3D 游戲開(kāi)發(fā)技術(shù)詳解與典型案例 [M].北京 :電子工業(yè)出版社 .2020:P103– P113 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 13頁(yè) 圖 :正交投影 而透視投影屬于非平行投影,可視的空間區(qū)域?yàn)樘菖_(tái)。 所以,通過(guò)以上分析,可以得知: 通過(guò)改變 Workspace 的 onTouchEvent(MotionEvent)方法處理 事件的方式,就可以改變 Launcher 的轉(zhuǎn)屏方式 。 如果最終需要處理事件的 視圖 的 onTouchEvent(MotionEvent)返回 true,那么后續(xù)事件將可以繼續(xù)傳遞給該 視圖 的 onTouchEvent(MotionEvent)處理。因此,一般開(kāi)發(fā)此類應(yīng)用程序都必須下載 Android Launcher 源碼。 由于移動(dòng)設(shè)備硬件的不斷發(fā)展升級(jí),用戶越來(lái)越渴望移動(dòng)設(shè)備能有更好的用戶體驗(yàn)。 關(guān)鍵詞: 安卓,桌面主題, OpenGL ES, Launcher, 3D,開(kāi)發(fā) ① google 公司官網(wǎng) . ② 安卓開(kāi)發(fā)者官網(wǎng) . ③ 本論文第 3 章將會(huì)介紹 ④ 本論文第 4 章將會(huì)介紹 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 3 頁(yè) ABSTRACT 2020,google has developed the Android smartphone operating system, which swept the world, making software engineers to develop on this system. And this thesis is to discuss the development of 3d desktop(the simulate 3D desktop and the 3D desktop based on OpenGL ES) based on the Android smart phone operating system and its optimized performance, in order to have a deeper understanding of the 3D development and put forward the views in the field. Both the simulate 3D desktop and the 3D desktop based on OpenGL ES are to modify the class named Workspace in the Android Launcher code. The difference is that this two desktop change screen in different ways to achieve the jump between Workspace child views. When changing screen, the simulate 3D desktop is to draw two images of the two related child views on the same screen at a fixed angle, a different visual direction. However, the 3D desktop based on OpenGL ES is to draw a N prism in the 3D scene, and each side of the prism is a corresponding image of the Workspace child view. Entering the corresponding child view of Workspace when user selects a side of the prism. Key Words: Android , Desktop Themes, OpenGL ES, Launcher,3D,develop 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 4 頁(yè) 目錄 中文摘要 .............................................................. 1 ABSTRACT ............................................................. 3 目錄 ................................................................. 4 第 1 章 引言 ........................................................... 6 第 2 章 關(guān)鍵技術(shù)介紹 ................................................... 7 JAVA 反射機(jī)制 ......................................................... 7 Android Launcher ...................................................... 7 界面模型 .......................................................... 8 觸摸事件處理 ...................................................... 9 Launcher 開(kāi)發(fā) ..................................................... 10 Opengl ES 標(biāo)準(zhǔn) ....................................................... 11 Opengl 標(biāo)準(zhǔn)簡(jiǎn)介 ................................................... 11 OpenGL ES 管道 .................................................... 12 投影方式 ......................................................... 12 光照效果 ......................................................... 14 法向量 ........................................................... 15 物體的材質(zhì) ....................................................... 15 紋理貼圖 ......................................................... 16 第 3 章 開(kāi)發(fā)模擬 3D 主題樣式 ............................................ 18 說(shuō)明與概述 ........................................................... 18 解決方案 ............................................................. 18 優(yōu)化方案 ............................................................. 20 第 4 章 開(kāi)發(fā) Opengl ES 3D 主題樣式 ....................................... 22 說(shuō)明與概述 ........................................................... 22 解決方案 ............................................................. 23 坐標(biāo)計(jì)算 ......................................................... 23 方案一 ....................................................... 23 方案二 ....................................................... 24 比較方案 ..................................................... 26 方案修正 ..................................................... 27 鏡像技術(shù) ......................................................... 29 優(yōu)化方案 ............................................................. 36 總結(jié) ................................................................. 38 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 5 頁(yè) 參考文獻(xiàn) ............................................................. 40 致 謝 .............................................................. 41 基于 Android手機(jī)系統(tǒng)的 3D桌面主題開(kāi)發(fā) 6 頁(yè) 第 1 章 引言 進(jìn)入 21世紀(jì),信息技術(shù)高速發(fā)展。 在本論文的工程中, Workspace 類中通過(guò) java 反射機(jī)制來(lái)實(shí)例化當(dāng)前主題樣式 proxy,并在相應(yīng)的方法中調(diào)用 proxy 的相應(yīng)方法。判斷的規(guī)則如下: 事件首先會(huì)傳遞到 onInterceptTouchEvent()方法 如果 父視圖 的 onInterceptTouchEvent(MotionEvent)方法 在接收到 事件處理完成之后 返回 false,那么后續(xù)的, 等事件將繼續(xù)會(huì)先傳遞給該 父視圖 ,之后才和 事件 一起 傳遞給 下一級(jí) 的目標(biāo) 子視圖 的. Workspace (ViewGroup) . CellLayout (Vie