安卓系统使用移动3DAPI进行高级游戏开发文库.ppt

上传人:tia****nde 文档编号:14136481 上传时间:2020-07-05 格式:PPT 页数:4 大小:2.27MB
返回 下载 相关 举报
安卓系统使用移动3DAPI进行高级游戏开发文库.ppt_第1页
第1页 / 共4页
安卓系统使用移动3DAPI进行高级游戏开发文库.ppt_第2页
第2页 / 共4页
安卓系统使用移动3DAPI进行高级游戏开发文库.ppt_第3页
第3页 / 共4页
点击查看更多>>
资源描述
Sprite3D,比例模式显示一个公告栏或者树木等 非比例模式显示字体或图标等,Image2D,在一个三维空间中定位一个二维的图片,Sprite3D,Appearance,Image2D,CompositingMode,Fog,渲染技巧,Use layers to impose rendering order Appearance包含一个层索引(整型) 为所有的网格和动画定义一个全局的索引 注意: 在天空盒中不能使用Z缓冲,使用层方式 注意: 三角面最大长度 根据需要添加简化的三角面 使用向量缓存是一个好方法,举例:旋转的盒子,/ 根据XYZ坐标定义一个盒子 static short cubeVertices = -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1 ; / 定义每个顶点一种颜色 static byte cubeColors = (byte) 255, (byte) 0, (byte) 0, / red (byte) 0, (byte) 255, (byte) 0, / green ; / 作为单一的三角形面定义 static int indices = 6,7,4,5,1,7,3,6,2,4,0,1,2,3 ; static int stripLen = 14 ;,定义一个盒子需要的原始数据,http:/www.anzhuo.cc/ 安卓手机论坛,举例:旋转的盒子,/ 从数组中填充VertexArrays int numVertices = vertices.length/3; VertexArray pos = new VertexArray(numVertices, 3, 2); VertexArray col = new VertexArray(numVertices, 3, 1); pos.set(0, numVertices, cubeVertices); col.set(0, numVertices, cubeColors); / 链接VertexArrays到VertexBuffer / 注意比例是(1.0) 斜率是(0,0,0) vertices = new VertexBuffer(); vertices.setPositions(pos, 1.0f, null); vertices.setColors(col); / 填充三角面 triangles = new TriangleStripArray(cubeIndices, stripLen); / 使用默认的表现(Appearance)建立一个网格 cube = new Mesh(vertices, triangles, new Appearance();,复制原始数据到对象中,美女图片 摢橻獑,
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 课件教案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!